home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekikoh Dennoh Club 2
/
Gekikoh Dennoh Club Vol. 2 (Japan).7z
/
Gekikoh Dennoh Club Vol. 2 (Japan) (Track 01).bin
/
games
/
px3
/
px.bas
< prev
next >
Wrap
BASIC Source File
|
1997-09-19
|
121KB
|
5,017 lines
/*====-----------------------------------------==== Line:1230 PX main
/*==== -: Picture Crosswords [ PX ] :- ==== Line:2694 Editor sub
/*==== St.'96-04-10 ~ Stop'96-06-15 ====
/*==== '96-07-26 ~ Ed.'96-10-15 ====
/*==== '96-10-31 ====
/*==== '96-12-17 2nd. release ====
/*==== '97-09-19 3rd. release ====
/*==== Programmed by MSY. ====
/*====-----------------------------------------====
int i,j,wk0,wk1,wk2,wk3
char ST1,BT1,ston,bton,stot,sttmf,sths
char cx,cy,cxn,cyn /* カーソル
char px,py
char cx_,cy_ /* cx*6,cy*6
char cmx,cmy,cmxn,cmyn
dim int mvof(23)={0,-1, 0, 1,-1,0, 1,-1, 0, 1 /* move table.(8way.)
,0, 1, 1, 1, 0,0, 0,-1,-1,-1}
char cs_grd /* カーソル グラデーション
dim char piko(1)
char kyb
char dbg=0,dskok
char g_mode /* game mode
char p_mode /* play mode
char pnlt=0 /* penalty
dim char pnl_of(7)={&H59,3,&H59,3, &H2E,3,&H00,0}
dim char rb_p(17)={164,164,164,164,206,206,164,164,206
,206,164,164,206,206,164,164,164,164}
char ps_x,ps_y
char pic_x,pic_y
char help_p /* ヘルプ
char stage=0 /* ステージ ナンバー
char try_c
int recd
int tim_c,tim_w /* タイム カウンタ
dim char flg_map(899) /* ジョウタイ マップ
char flg_on_mode
int stg_cmp
char tit_on
char stg_p=0
char bgm_no=0,bgm_no_bk /* bgm number
char inft=0 /* info. type
char svld=0,ldok /* save/load
int dsp_x,dsp_y
char tile=1 /* タイル ニ スル?
dim int dsp_of(31)={284,281,279,276,274,271,269,256 /* カンセイズ オフセット
,408,393,378,363,348,333,318,256
,304,299,294,289,284,279,274,256
, 56, 51, 46, 41, 36, 31, 26,256}
dim char star_x(15),star_y(15) /* クリアーガメン ホシ ノ ザヒョウ
dim char pyon(7)={136,128,124,120,122,124,128,136}
dim char stg_data(51199)
dim char user_data(51199)
char pen_mode /* エディット モード
char pen_c /* エディット アクティブ カラー
char pc_r,pc_g,pc_b
char xsize=5,ysize=5 /* モンダイ ノ サイズ
dim char edit_map(899)
dim int edit_palet(7)={2114,30844,22420,3964,55362,59516,61314,63420}
dim int edit_palet_def(7)={2114,30844,22420,3964,55362,59516,61314,63420}
char flbt=0 /* fill bit
char n_head /* title input
char ni_x,ni_y
dim char stg_name(15)
dim char fnt_l(259)={
&H00, 1, 2, 3, 4, 5, 6, 7, 8, 9, 71, 72, 73, 74, 75,152,153,154,155,156
, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 76, 77, 78, 79, 80,157,158,159,160,161
, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 81, 82, 83, 84, 85,162,163,164,165,166
, 30, 31, 32, 33, 34, 35,224,225,226,227, 86, 87, 88, 89, 90,167,168,169,170,171
, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 91, 92, 93, 94, 95,172,173,174,175,176
, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 96, 97, 98, 99,100,177,178,179,180,181
, 56, 57, 58, 59, 60, 61,232,233,240,241,101,102,103,104,105,182,183,184,185,186
,228,229,230,231,234,235,236,237,238,239,106,248,107,249,108,187,252,188,253,189
,118,119,120,121,122,199,200,201,202,203,109,110,111,112,113,190,191,192,193,194
,123,124,125,126,127,204,205,206,207,208,114,115,116,117, 70,195,196,197,198,151
,128,129,130,131,132,209,210,211,212,213, 62, 63, 64, 65, 66,143,144,145,146,147
,133,134,135,136,137,214,215,216,217,218, 67,250, 68,251, 69,148,254,149,247,150
,138,139,140,141,142,219,220,221,222,223,242,243,244,245,246,255,255,255,255,255}
char shf=0 /* shift
dim str shf_s(3)[5]={"UP___","DOWN_","LEFT_","RIGHT"}
char swp_s0=0,swp_s1=0 /* swap
char mir=0 /* mirror
dim str mir_s(1)[3]={"UaD","LaR"}
char h_head,h_err
char hwk0,hwk1,hwk2,hwk3
dim char hint_buff(15)
dim char h_bit(1)
dim char hint_x(329)
dim char hint_y(329)
str stg_fl[8]
dim char PAL(287),PCG1(37119)
dim int R_TXT(255)
dim char wk9(127),wkA(899),FLW(255),NOP(255)
dim char BLK0(35),BLK1(35),BLK2(35),MK0(23),MK1(23),PEK(899)
dim char CB0(35),CB1(35),CB2(35),CB3(35),CB4(35),CB5(35),CB6(35),CB7(35)
dim char CBS0(35),CBS1(35),CBS2(35),CBS3(35),CBS4(35),CBS5(35),CBS6(35),CBS7(35)
dim char BK0(255)
dim char BK2(255),BK2_(255),BK3(255),BK3_(255)
dim char BK4(1023),BK4S0(127),BK4S1(127)
dim char BK5(255),BK5_(255)
dim char TBK0(255),TBK0_(255),TBK1(255),TBK1_(255),TBK2(255),TBK2_(255)
dim char TBK3(255),TBK3_(255),TBK3__(255)
dim char TBK4(255),TBK4_(255),TBK4__(255)
dim char REPT0(63),REPT1(63),REPT2(63),REPT3(63)
dim char REPT4(63),REPT5(63),REPT6(63),REPT7(63)
dim char HLPM(895)
dim char DSP_MN(1599),DSP_CL(1599),DSP_BK(511)
dim char PROB0(255),PROB1(255)
dim str zmd_list(23)={
"NEIRO.ZMD",
"SE0.ZMD","SE1.ZMD","SE2.ZMD","SE3.ZMD",
"SE4.ZMD","SE5.ZMD","SE6.ZMD","SE7.ZMD",
"",
"PT001MK_.ZMD","PT008MK_.ZMD","PT009MK_.ZMD","PT012MK_.ZMD",
"PT014MK_.ZMD",
"PT006MK_.ZMD","PT010MK_.ZMD","PT015MK_.ZMD","PT002MK_.ZMD",
"PT003MK_.ZMD","PT005MK_.ZMD","PT007MK_.ZMD","PT011MK_.ZMD",
"SILENT.ZMD"}
/*-*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*-
DATA_READ() /* ETC. data read
SCR_INIT() /* screen init.
GPAL_SET() /* graphics palet set
PCG_SET() /* objects set
SCR_MK1() /* screen make
/*---- -: Main Loop :- ----
while 1
TITLE()
if kyb = &H1B or g_mode = 4 then break
if g_mode = 0 then {
p_mode=0
GAME() /* game loop
}
if g_mode = 1 then {
if p_mode = 0 then {
EDITOR() /* editor
} else {
g_mode=0
GAME() /* edit play
}
}
if g_mode = 2 or g_mode = 3 then RULE() /* rule disp.
endwhile
m_stop()
tcls()
end
/*[T]= -: Title :- ====
/*====-------------====
/* use sp.plane : 0 - 15 > pic・・・
/* : 16 - 39 > title logo
/* : 40 > cursole
/* : 41 - 44,71 - 74 > "play","load"
/* : 45 - 52 > "edit","play"
/* : 53 - 56 > "rule"
/* : 57 - 66 > "penalty","on/off"
/* : 67 - 70 > "exit"
func TITLE()
home(0, 0, 0) : home(1,256, 0)
contrast(0)
p_mode=0
TITLE_MK() /* screen make.
vpage(3) : sp_disp(1) : TX_DISP(1)
contrast(15)
play_zmd(10) /* play "title bgm"
cmy=0
tim_c=0
/*---- -: Title Main :- ----
kb_cls()
ston=&HFF
sths=&HFF
bton=kstrig(1)
while tim_c <> 900
tim_c=tim_c+1
ST_INP()
if kyb = &H1B then break /* return to os.
/*---- -: カーソル ピコピコ :- ----
piko(0)=piko(0)+1 and 3
if piko(0) = 0 then {
piko(1)=piko(1)+1 and 3
}
/*++++ -: カーソル イドウ :- ++++
cmyn=cmy
if ston = 0 then {
if ST1 <> 0 and sths = ST1 then {
if ST1 = 2 or ST1 = 8 then {
play_se(1)
cmy=cmy+mvof(ST1+10)
if cmy = &HFF then cmy=4
if cmy = 5 then cmy=0
tim_c=0
}
if ST1 = 4 or ST1 = 6 then {
if cmy = 0 and ldok = 1 then {
play_se(1)
svld=svld+1 and 1
sp_scrl( 71,200,152,&H361,svld) /* "SP":load
sp_scrl( 72,208,152,&H367,svld)
sp_scrl( 73,216,152,&H363,svld)
sp_scrl( 74,224,152,&H32D,svld)
}
if cmy = 1 then {
play_se(1)
p_mode=p_mode+1 and 1
sp_scrl( 49,200,168,&H45C,p_mode) /* "SP":play
sp_scrl( 50,208,168,&H461,p_mode)
sp_scrl( 51,216,168,&H463,p_mode)
sp_scrl( 52,224,168,&H42F,p_mode)
}
if cmy = 3 then {
play_se(1)
pnlt=pnlt+1 and 1
sp_scrl( 65,232,200,&H600+pnl_of((pnlt shl 2) ),pnl_of((pnlt shl 2)+1)) /* "SP":on/off
sp_scrl( 66,240,200,&H600+pnl_of((pnlt shl 2)+2),pnl_of((pnlt shl 2)+3))
}
tim_c=0
}
}
}
sp_scrl( 40,148+piko(1),156+(cmy shl 4)-piko(1),&H414C,3) /* "SP":テ カーソル
/*++++ -: モード ケッテイ :- ++++
if bton = 0 and BT1 = 1 and cmy <> 3 then {
play_se(3)
g_mode=cmy
break
}
if bton = 0 and BT1 = 2 then {
play_se(3)
bton=BT1
TIT_S1()
}
/*++++ -: スティック ノ ニュウリョク アトショリ :- ++++
ST_CK2(16,2)
/*++++ -: ボタン ノ ニュウリョク アトショリ :- ++++
if bton <> BT1 then bton=0
sp_out()
endwhile
if tim_c = 900 then {
contrast(0)
g_mode=3 /* キョウセイ rule
}
m_fadeout(40) /* music fadeout
SCR_ALL_OFF()
endfunc
/*[T]= -: Problem File Change :- ====
/*====---------------------------====
func TIT_S1()
char na=0
apage(0)
for i=0 to 5
wk0=(i shl 4)+24
put(wk0,168,wk0+15,183,BK0)
put(wk0,184,wk0+15,199,BK0)
next
tfill( 24,168,119,199, 8)
tfill( 25,169,118,198,15)
tfill( 26,170,117,197, 8)
tfill( 27,171,116,196, 0)
TFP( 34,172,"I") : TFP( 28,172,"F") : TFP( 40,172,"LE_CHANGE")
TFP( 44,184,"PX[STG0") : TFP( 60,186,"[")
kb_cls()
ston=&HFF
sths=&HFF
while 1
ST_INP()
/*++++ -: カーソル イドウ :- ++++
if ston = 0 then {
if ST1 <> 0 and (ST1 and 1) = 0 and sths = ST1 then {
play_se(1)
na=na+mvof(ST1)-mvof(ST1+10) and 15
TFP( 92,184,hex$(na))
}
}
/*++++ -: モード ケッテイ :- ++++
if bton = 0 and BT1 = 1 then {
/*----- -: ファイル ガ アルカ チェック :- ----
wk0=filesnum("PX_STG"+hex$(na)+".DAT",&H20)
if wk0 <> 0 then {
play_se(3)
bton=BT1
break
} else {
play_se(6)
bton=BT1
}
}
if bton = 0 and BT1 = 2 then {
play_se(2)
bton=BT1
break
}
/*++++ -: スティック ノ ニュウリョク アトショリ :- ++++
ST_CK2(16,2)
/*++++ -: ボタン ノ ニュウリョク アトショリ :- ++++
if bton <> BT1 then bton=0
sp_out()
endwhile
if BT1 = 1 then {
/*----- -: ファイル ガ アルカ チェック :- ----
wk0=filesnum("PX_STG"+hex$(na)+".DAT",&H20)
if wk0 <> 0 then {
/*----- -: アッタ! :- ----
stg_fl="PX_STG"+hex$(na)
wk0=fopen(stg_fl+".DAT","r")
fread(stg_data,51200,wk0)
fclose(wk0)
ldok=filesnum(stg_fl+".RES",&H20)
if ldok = 0 and svld = 1 then {
svld=0
sp_scrl(71,0,0,0,0)
sp_scrl(72,0,0,0,0)
sp_scrl(73,0,0,0,0)
sp_scrl(74,0,0,0,0)
}
} else {
beep /* ナカッタ!
}
}
apage(0)
fill( 24,168,119,199, 0)
tfill( 24,168,119,199, 0)
tim_c=0
endfunc
/*[T]= -: Title Display Make :- ====
/*====--------------------------====
func TITLE_MK()
char n0,n1,n2,n3,n4
apage(0) /* active "0" make
/*---- -: Type-A
/* for i=0 to 15
/* box(i,i,255-i,255-i,177+(i shl 1))
/* next
/*---- -: Type-B
for i=0 to 15
n0=16-i : n1=239+i
n2=8-(i shr 1) : n3=247+(i shr 1)
n4=207-(i shl 1)
box( 0, 0,255,255,n4)
line(n0,n0,n2,127,n4) : line(n0,n1,n2,128,n4)
line(n1,n0,n3,127,n4) : line(n1,n1,n3,128,n4)
line(n0,n0,127,n2,n4) : line(n1,n0,128,n2,n4)
line(n0,n1,127,n3,n4) : line(n1,n1,128,n3,n4)
paint( 15-i, 15-i,n4)
paint( 15-i,240+i,n4)
paint(240+i, 15-i,n4)
paint(240+i,240+i,n4)
next
/*---- -: object set :- ----
sp_scrl( 0, 40, 48,&H35C,3) /* "SP":picture
sp_scrl( 1, 48, 48,&H42A,3)
sp_scrl( 2, 56, 48,&H560,3)
sp_scrl( 3, 64, 48,&H66A,3)
sp_scrl( 4, 72, 48,&H72B,3)
sp_scrl( 5, 80, 48,&H864,3)
sp_scrl( 6, 88, 48,&H362,3)
sp_scrl( 7,104, 48,&H460,3) /* "SP":crossword
sp_scrl( 8,112, 48,&H564,3)
sp_scrl( 9,120, 48,&H667,3)
sp_scrl( 10,128, 48,&H769,3)
sp_scrl( 11,136, 48,&H869,3)
sp_scrl( 12,144, 48,&H32C,3)
sp_scrl( 13,152, 48,&H467,3)
sp_scrl( 14,160, 48,&H564,3)
sp_scrl( 15,168, 48,&H62D,3)
for i=0 to 3 /* "SP":PX logo
sp_scrl( 16+i, 80+(i shl 4), 72,&H370+i,3)
sp_scrl( 20+i, 80+(i shl 4), 88,&H374+i,3)
sp_scrl( 24+i, 84+(i shl 4), 76,&H470+i,3)
sp_scrl( 28+i, 84+(i shl 4), 92,&H474+i,3)
sp_scrl( 32+i, 76+(i shl 4), 68,&H570+i,3)
sp_scrl( 36+i, 76+(i shl 4), 84,&H574+i,3)
next
sp_scrl( 41,160,152,&H35C,3) /* "SP":play
sp_scrl( 42,168,152,&H361,3)
sp_scrl( 43,176,152,&H363,3)
sp_scrl( 44,184,152,&H32F,3)
sp_scrl( 71,200,152,&H361,svld) /* "SP":load
sp_scrl( 72,208,152,&H367,svld)
sp_scrl( 73,216,152,&H363,svld)
sp_scrl( 74,224,152,&H32D,svld)
sp_scrl( 45,160,168,&H462,3) /* "SP":edit
sp_scrl( 46,168,168,&H42D,3)
sp_scrl( 47,176,168,&H42A,3)
sp_scrl( 48,184,168,&H46A,3)
sp_scrl( 49,200,168,&H45C,p_mode) /* "SP":play
sp_scrl( 50,208,168,&H461,p_mode)
sp_scrl( 51,216,168,&H463,p_mode)
sp_scrl( 52,224,168,&H42F,p_mode)
sp_scrl( 53,160,184,&H564,3) /* "SP":rule
sp_scrl( 54,168,184,&H52B,3)
sp_scrl( 55,176,184,&H561,3)
sp_scrl( 56,184,184,&H562,3)
sp_scrl( 57,160,200,&H65C,3) /* "SP":penalty
sp_scrl( 58,168,200,&H662,3)
sp_scrl( 59,176,200,&H62E,3)
sp_scrl( 60,184,200,&H663,3)
sp_scrl( 61,192,200,&H661,3)
sp_scrl( 62,200,200,&H66A,3)
sp_scrl( 63,208,200,&H62F,3)
sp_scrl( 64,224,200,&H667,3) /* "SP":on/off
sp_scrl( 65,232,200,&H600+pnl_of((pnlt shl 2) ),pnl_of((pnlt shl 2)+1))
sp_scrl( 66,240,200,&H600+pnl_of((pnlt shl 2)+2),pnl_of((pnlt shl 2)+3))
sp_scrl( 67,160,216,&H762,3) /* "SP":exit
sp_scrl( 68,168,216,&H75E,3)
sp_scrl( 69,176,216,&H72A,3)
sp_scrl( 70,184,216,&H76A,3)
sp_out()
TFP( 52,232,"ALL_RIGHTS_RESERVED")
TFP( 72,225,"`") : TFP( 80,224,"1996[1997_MSY]")
endfunc
/*[G]= -: Play :- ====
/*====------------====
func GAME()
if p_mode = 0 then stage=0
pen_mode=0
/*---- -: Play Mode Main Loop :- ----
while 1
if svld = 1 and p_mode = 0 then {
RES_LD1() /* load
} else {
svld=0
SELECT() /* モンダイ セレクト
}
if kyb = &H1B then break /* ret. to title
G_INIT() /* start init.
RES_LD2()
BK_PAL_SET() /* back graphics palet
GAME_ST() /* start!
PX_MAIN() /* main
if kyb = &H1B then break /* ret. to title
if g_mode = 99 then {
GAME_OVER() /* game over
break
}
STG_CLR() /* clear!
if kyb = &H1B then break /* ret. to title
CMP_PIC_DIS() /* カンセイズ ヒョウジ
if kyb = &H1B then break /* ret. to title
if p_mode = 1 then break /* edit-play exit
endwhile
SCR_ALL_OFF()
apage(1)
fill( 8, 8, 39, 39, 4)
sp_palet( 0,PAL, 0)
sp_out()
endfunc
/*[G]= -: Problem Select :- ====
/*====----------------------====
/* use sp.plane : 0 - 12 > logo
/* : 13-14,15-17 > no
/* : 18-19,20-23 > x,y size
/* : 24-28 > title
/* : 29-31,32-33 > try
/* : 34-39,40-44 > record
/* : 45-48 > cursole
/* : 50-79 > ???
/* : 80-105 > etc.
/* : 106-110 > sorry
/* : 111-114 > size
func SELECT()
home(0,256, 0) : home(1, 0,256)
SEL_MK() /* screen make
tit_on=0
apage(0)
put(344+(ps_x shl 4), 96+(ps_y shl 4),359+(ps_x shl 4),111+(ps_y shl 4),PROB0)
ps_x=stage mod 10
ps_y=stage/10
put(344+(ps_x shl 4), 96+(ps_y shl 4),359+(ps_x shl 4),111+(ps_y shl 4),PROB1)
sp_scrl( 45,112+(ps_x shl 4),120+(ps_y shl 4),&H14C,3) /* "SP":オテテ
/* sp_out()
vpage(3) : sp_disp(1) : TX_DISP(1)
play_zmd(11) /* play "select bgm"
/*---- -: problem select main :- ----
kb_cls()
ston=&HFF
sths=&HFF
bton=kstrig(1)
while 1
ST_INP()
if kyb = &H1B then break /* ret. to title
/*---- -: カーソル ピコピコ :- ----
piko(0)=piko(0)+1 and 3
if piko(0) = 0 then {
piko(1)=piko(1)+1 and 3
}
/*++++ -: カーソル イドウ :- ++++
cxn=ps_x
cyn=ps_y
if ston = 0 then {
if ST1 <> 0 and sths = ST1 then {
ps_x=ps_x+mvof(ST1)
ps_y=ps_y+mvof(ST1+10)
if ps_x = &HFF then {
ps_x=9
ps_y=ps_y-1
}
if ps_x >= 10 then {
ps_x=0
ps_y=ps_y+1
}
if ps_y = &HFF then ps_y=9
if ps_y >= 10 then ps_y=0
if ps_x <> cxn or ps_y <> cyn then {
play_se(1)
apage(0)
put(344+(cxn shl 4), 96+(cyn shl 4),359+(cxn shl 4),111+(cyn shl 4),PROB0)
put(344+(ps_x shl 4), 96+(ps_y shl 4),359+(ps_x shl 4),111+(ps_y shl 4),PROB1)
stage=ps_y*10+ps_x
SEL_S1() /* problem status disp.
}
}
}
sp_scrl( 45,112+(ps_x shl 4)-piko(1),120+(ps_y shl 4)-piko(1),&H14C,3) /* "SP":オテテ
if ST1 = 0 then {
if tit_on = 0 then {
SEL_S2() /* title disp.
}
if tit_on = 1 then {
SEL_S3() /* picture disp.
}
}
if bton <> BT1 then {
/*++++ -: "A" ボタン ガ オサレタトキ :- ++++
if BT1 = 1 then {
if tit_on = &HEF then {
play_se(6)
bton=BT1
} else {
play_se(3)
bton=BT1
break
}
}
/*++++ -: "B" ボタン ガ オサレタトキ :- ++++
if BT1 = 2 then {
play_se(2)
kyb=&H1B
bton=BT1
break
}
}
/*++++ -: スティック ノ ニュウリョク アトショリ :- ++++
ST_CK2(16,2)
/*++++ -: ボタン ノ ニュウリョク アトショリ :- ++++
if bton <> BT1 then bton=0
sp_out()
endwhile
m_fadeout(40)
SCR_ALL_OFF()
endfunc
/*[G]= -: Problem Select Display Make :- ====
/*====-----------------------------------====
func SEL_MK()
apage(1) /* active "1" make.
if p_mode = 0 then {
for i=0 to 7
wk0=(i shl 5)+256
for j=0 to 7
wk1=(j shl 5)
put(wk1 ,wk0 ,wk1+15,wk0+15,BK5)
put(wk1 ,wk0+16,wk1+15,wk0+31,BK5_)
put(wk1+16,wk0 ,wk1+31,wk0+15,BK5_)
put(wk1+16,wk0+16,wk1+31,wk0+31,BK5)
next
next
} else {
for i=0 to 7
wk0=(i shl 5)+256
for j=0 to 7
wk1=(j shl 5)
put(wk1 ,wk0 ,wk1+15,wk0+15,BK3)
put(wk1 ,wk0+16,wk1+15,wk0+31,BK3_)
put(wk1+16,wk0 ,wk1+31,wk0+15,BK3_)
put(wk1+16,wk0+16,wk1+31,wk0+31,BK3)
next
next
}
/*---- -: object set :- ----
sp_scrl( 0, 32, 16,&H35C,3) /* "SP":problem
sp_scrl( 1, 48, 16,&H464,3)
sp_scrl( 2, 64, 16,&H567,3)
sp_scrl( 3, 80, 16,&H65D,3)
sp_scrl( 4, 96, 16,&H761,3)
sp_scrl( 5,112, 16,&H862,3)
sp_scrl( 6,128, 16,&H366,3)
sp_scrl( 7,160, 16,&H469,3) /* "SP":select
sp_scrl( 8,176, 16,&H562,3)
sp_scrl( 9,192, 16,&H661,3)
sp_scrl( 10,208, 16,&H762,3)
sp_scrl( 11,224, 16,&H860,3)
sp_scrl( 12,240, 16,&H36A,3)
sp_scrl( 13,104, 36,&H32E,3) /* "SP":no
sp_scrl( 14,112, 36,&H367,3)
sp_scrl( 18,200, 36,&H85E,3) /* "SP":x/y
sp_scrl( 19,232, 36,&H82F,3)
sp_scrl(111,160, 36,&H469,3) /* "SP"size,
sp_scrl(112,168, 36,&H42A,3)
sp_scrl(113,176, 36,&H41F,3)
sp_scrl(114,184, 36,&H462,3)
sp_scrl(115,224, 36,&H45F,3)
sp_scrl( 24,104, 56,&H66A,3) /* "SP":title
sp_scrl( 25,112, 56,&H62A,3)
sp_scrl( 26,120, 56,&H66A,3)
sp_scrl( 27,128, 56,&H661,3)
sp_scrl( 28,136, 56,&H662,3)
sp_scrl( 29,104, 76,&H56A,3) /* "SP":try
sp_scrl( 30,112, 76,&H564,3)
sp_scrl( 31,120, 76,&H52F,3)
sp_scrl( 34,160, 76,&H564,3) /* "SP":record
sp_scrl( 35,168, 76,&H562,3)
sp_scrl( 36,176, 76,&H560,3)
sp_scrl( 37,184, 76,&H567,3)
sp_scrl( 38,192, 76,&H564,3)
sp_scrl( 39,200, 76,&H52D,3)
sp_scrl( 42,232, 76,&H557,3)
for i=0 to 8 /* "SP":ヨコ ノ スウジ
sp_scrl( 50+i,104+(i shl 4), 96,&H421+i,3)
next
sp_scrl( 59,244, 96,&H421,3)
sp_scrl( 60,252, 96,&H420,3)
sp_scrl( 61, 88,112,&H320,3) /* "SP":タテ ノ スウジ
for i=0 to 8
sp_scrl( 62+(i shl 1), 82,128+(i shl 4),&H321+i,3)
sp_scrl( 63+(i shl 1), 90,128+(i shl 4),&H320 ,3)
next
sp_scrl( 80, 20,112,&H55C,3) /* "SP":picture
sp_scrl( 81, 28,112,&H52A,3)
sp_scrl( 82, 36,112,&H560,3)
sp_scrl( 83, 44,112,&H56A,3)
sp_scrl( 84, 52,112,&H52B,3)
sp_scrl( 85, 60,112,&H564,3)
sp_scrl( 86, 68,112,&H562,3)
sp_scrl( 92, 24,180,&H15A,3) /* "SP":joy stick
sp_scrl( 93, 24,196,&H15B,3)
sp_scrl( 87, 28,196,&H14C,3) /* "SP":?move
sp_scrl( 88, 40,196,&H366,3)
sp_scrl( 89, 48,196,&H367,3)
sp_scrl( 90, 56,196,&H368,3)
sp_scrl( 91, 64,196,&H362,3)
sp_scrl( 94, 24,212,&H663,3) /* "SP":a-button
sp_scrl( 95, 24,220,&H16D,3)
sp_scrl( 96, 40,220,&H45C,3) /* "SP":play
sp_scrl( 97, 48,220,&H461,3)
sp_scrl( 98, 56,220,&H463,3)
sp_scrl( 99, 64,220,&H42F,3)
sp_scrl(100, 24,236,&H55D,3) /* "SP":b-button
sp_scrl(101, 24,244,&H16D,3)
sp_scrl(102, 40,244,&H862,3) /* "SP":exit
sp_scrl(103, 48,244,&H85E,3)
sp_scrl(104, 56,244,&H82A,3)
sp_scrl(105, 64,244,&H86A,3)
/*---- -: トイテイル モンダイ ニ ハナ ヲ ソエル :- ----
if p_mode = 0 then {
for i=0 to 9
for j=0 to 9
wk0=(i*10+j) shl 9
if stg_data(wk0) = 0 then {
tput( 89+(j shl 4), 97+(i shl 4),16,16,NOP,"pset")
} else {
if (stg_data(wk0+ 34) and 1) = 1 then {
tput( 86+(j shl 4), 94+(i shl 4),16,16,FLW,"xor")
}
}
next
next
} else {
for i=0 to 9
for j=0 to 9
if user_data(((i*10+j) shl 9)) = 0 then {
tput( 89+(j shl 4), 97+(i shl 4),16,16,NOP,"pset")
}
next
next
}
SEL_S1() /* problem status disp.
/* SEL_S2()
tfill( 12, 20, 83, 91, 8) /* picture ワク
tfill( 13, 21, 82, 90,15)
tfill( 14, 22, 81, 89,14)
tfill( 15, 23, 80, 88, 8)
tfill( 16, 24, 79, 87, 0)
tfill(134, 37,249, 58, 8) /* title ワク
tfill(135, 38,248, 57,15)
tfill(136, 39,247, 56, 8)
tfill(137, 40,246, 55, 0)
sp_out()
endfunc
/*[G]= -: Problem Status :- ====
/*====----------------------====
func SEL_S1()
/*---- -: normal/user :- ----
SSP3( 15,128, 36,stage+1,&H720,3) /* stage number
if p_mode = 0 then {
/*---- -: normal mode status :- ----
xsize=stg_data((stage shl 9) ) /* x-size
SSP2( 20,208, 36,xsize,&H720,0)
ysize=stg_data((stage shl 9)+ 1) /* y-size
SSP2( 22,240, 36,ysize,&H720,0)
try_c=stg_data((stage shl 9)+ 35) /* try count
SSP2( 32,136, 76,try_c,&H720,0)
recd=stg_data((stage shl 9)+ 36) shl 24 /* record
recd=recd+(stg_data((stage shl 9)+ 37) shl 16)
recd=recd+(stg_data((stage shl 9)+ 38) shl 8)
recd=recd+ stg_data((stage shl 9)+ 39)
tim_w=recd / 60
SSP2( 40,216, 76,tim_w / 60,&H720,0) /* min.
SSP2( 43,240, 76,tim_w mod 60,&H720,3) /* sec.
} else {
/*---- -: user mode status :- ----
xsize=user_data((stage shl 9) ) /* x-size
SSP2( 20,208, 36,xsize,&H720,0)
ysize=user_data((stage shl 9)+ 1) /* y-size
SSP2( 22,240, 36,ysize,&H720,0)
try_c=0 /* try count
recd=&H57E3F /* record
SSP2( 32,136, 76, 0,&H720,0)
SSP2( 40,216, 76,99,&H720,0) /* record min.
SSP2( 43,240, 76,59,&H720,3) /* sec.
}
tit_on=0
apage(0)
fill(272, 24,335, 87, 25) /* picture clear
tfill( 16, 48, 79, 63, 0)
tfill(138, 40,245, 55, 0) /* title clear
endfunc
/*[G]= -: Problem Title :- ====
/*====---------------------====
func SEL_S2()
/*---- -: ソノ モンダイヲ トイテイルカ? :- ----
if p_mode = 0 then {
wk0=stg_data((stage shl 9)+ 34)
if dbg = 1 then wk0=1
} else {
wk0=user_data((stage shl 9)+ 34)
if (wk0 and 2) = 2 then wk0=0 else wk0=1
}
sp_scrl(106,0,0,0,0)
sp_scrl(107,0,0,0,0)
sp_scrl(108,0,0,0,0)
sp_scrl(109,0,0,0,0)
sp_scrl(110,0,0,0,0)
/*---- -: マダ トイテイナイ :- ----
if (wk0 and 1) = 0 or xsize = 0 then {
sp_scrl(106, 40, 64,&H669,3) /* "SP":sorry
sp_scrl(107, 48, 64,&H667,3)
sp_scrl(108, 56, 64,&H664,3)
sp_scrl(109, 64, 64,&H664,3)
sp_scrl(110, 72, 64,&H62F,3)
tit_on=&HFF
if xsize = 0 then tit_on=&HEF
} else {
/*---- -: トイテイル :- ----
if p_mode = 0 then {
for i=0 to 11 /* stage title
wk0=stg_data((stage shl 9)+ 2+i)
TFP2((i shl 3)+i+138, 40,wk0)
next
for i=0 to 7 /* stage palet
wk0=stg_data((stage shl 9)+ 18+(i shl 1))
wk1=stg_data((stage shl 9)+ 19+(i shl 1))
PL_S(12+i,(wk0 shl 8)+wk1)
next
} else {
for i=0 to 11 /* stage title
wk0=user_data((stage shl 9)+ 2+i)
TFP2((i shl 3)+i+138, 40,wk0)
next
for i=0 to 7 /* stage palet
wk0=user_data((stage shl 9)+ 18+(i shl 1))
wk1=user_data((stage shl 9)+ 19+(i shl 1))
PL_S(12+i,(wk0 shl 8)+wk1)
next
}
tit_on=1
pic_x=0
pic_y=0
dsp_x=304-xsize
dsp_y=56-ysize
}
endfunc
/*==== -: Problem Picture :- ====
/*====-----------------------====
func SEL_S3()
if p_mode = 0 then {
for i=0 to 14
wk0=stg_data((stage shl 9)+ 62+pic_y*15+i)
wk0=wk0 and &HEE
/* wk0=wk0 xor &H11 /* bit off => ハントウメイニ
wk9((i shl 2) )=24+(wk0 shr 4)
wk9((i shl 2)+1)=24+(wk0 shr 4)
wk9((i shl 2)+2)=24+(wk0 and 15)
wk9((i shl 2)+3)=24+(wk0 and 15)
next
} else {
for i=0 to 14
wk0=user_data((stage shl 9)+ 62+pic_y*15+i)
wk0=wk0 and &HEE
/* wk0=wk0 xor &H11 /* bit off => ハントウメイニ
wk9((i shl 2) )=24+(wk0 shr 4)
wk9((i shl 2)+1)=24+(wk0 shr 4)
wk9((i shl 2)+2)=24+(wk0 and 15)
wk9((i shl 2)+3)=24+(wk0 and 15)
next
}
put(dsp_x,dsp_y+(pic_y shl 1),dsp_x+(xsize shl 1)-1,dsp_y+(pic_y shl 1),wk9)
put(dsp_x,dsp_y+(pic_y shl 1)+1,dsp_x+(xsize shl 1)-1,dsp_y+(pic_y shl 1)+1,wk9)
pic_y=pic_y+1
if pic_y = ysize then tit_on=&HFF
if piko(0) <> 3 then piko(0)=piko(0)+1
endfunc
/*[G]= -: Game Initialize :- ====
/*====-----------------------====
/* use sp.plane : 80 > モンダイ
/* : 81 > ジカン
/* : 84-86 > prob. no.
/* : 87 > ":"
/* : 88-91 > time
func G_INIT()
home(0, 0, 0) : home(1, 0, 0)
/*---- -: Screen Make :- ----
apage(1)
fill( 8, 8, 39, 39, 4) /* sample clear
apage(0)
fill( 6, 6, 69, 69,177) /* ジカン ナドヲ ヒョウジスル ワク
fill( 4, 4, 67, 67, 62)
for i=0 to 7
wk0=(i shl 3)
put( 4,wk0+ 4, 11,wk0+11,REPT4)
put( 60,wk0+ 4, 67,wk0+11,REPT5)
put(wk0+ 4, 4,wk0+11, 11,REPT6)
put(wk0+ 4, 60,wk0+11, 67,REPT7)
next
put( 4, 4, 11, 11,REPT0)
put( 4, 60, 11, 67,REPT1)
put( 60, 4, 67, 11,REPT2)
put( 60, 60, 67, 67,REPT3)
put( 8, 48, 63, 63,HLPM)
if p_mode = 0 then {
if (stg_data((stage shl 9)+ 34) and 1) = 1 then {
tput( 0, 0,16,16,FLW,"pset")
}
}
if svld = 0 or p_mode = 1 then {
tim_c=0
help_p=20
}
GI_S1()
/*---- -: Stage Data Making :- ----
if p_mode = 0 then {
xsize=stg_data((stage shl 9) ) /* x-size
ysize=stg_data((stage shl 9)+ 1) /* y-size
for i=0 to 15 /* stage title
stg_name(i)=stg_data((stage shl 9)+ 2+i)
next
for i=0 to 7 /* stage palet
wk0=stg_data((stage shl 9)+ 18+(i shl 1))
wk1=stg_data((stage shl 9)+ 19+(i shl 1))
edit_palet(i)=(wk0 shl 8)+wk1
PL_S(12+i,(wk0 shl 8)+wk1)
next
for i=0 to 449 /* stage data
wk0=stg_data((stage shl 9)+ 62+i)
edit_map((i shl 1) )=wk0 shr 4
edit_map((i shl 1)+1)=wk0 and 15
next
} else {
xsize=user_data((stage shl 9) ) /* x-size
ysize=user_data((stage shl 9)+ 1) /* y-size
for i=0 to 15 /* stage title
stg_name(i)=user_data((stage shl 9)+ 2+i)
next
for i=0 to 7 /* stage palet
wk0=user_data((stage shl 9)+ 18+(i shl 1))
wk1=user_data((stage shl 9)+ 19+(i shl 1))
edit_palet(i)=(wk0 shl 8)+wk1
PL_S(12+i,(wk0 shl 8)+wk1)
next
for i=0 to 449 /* stage data
wk0=user_data((stage shl 9)+ 62+i)
edit_map((i shl 1) )=wk0 shr 4
edit_map((i shl 1)+1)=wk0 and 15
next
}
if svld = 0 or p_mode = 1 then {
for i=0 to 899 /* flag data clear
flg_map(i)=0
next
stg_cmp=0 /* stg_cmp ショキチ ケイサン
for i=0 to 899
if (edit_map(i) and 1) = 0 then stg_cmp=stg_cmp+1
next
}
/*---- -: Hint Data Display :- ----
if svld = 0 or p_mode = 1 then HINT_CHECK()
EDIT_DIS()
KEISEN()
endfunc
func GI_S1()
sp_scrl( 80, 24, 26,&H248,3-(inft*3)) /* "SP":モンダイ
if inft = 0 then {
apage(0)
fill( 8, 8, 39, 39, 62) /* ツウジョウ ニ モドス
SSP3( 84, 52, 26,stage+1,&H230,0) /* モンダイバンゴウ
tfill( 56, 16, 63, 47, 0)
} else {
apage(0)
fill( 8, 8, 39, 39, 64) /* ジョウタイミホン ノ ワク
fill( 9, 9, 38, 38, 0)
sp_scrl(84,0,0,0,0) /* モンダイバンゴウ ヲ ケス
sp_scrl(85,0,0,0,0)
sp_scrl(86,0,0,0,0)
TFP( 56, 18,"j") /* (M)in,(S)ec
TFP( 56, 36,"k")
}
sp_scrl( 81, 24, 44,&H24A,3-(inft*3)) /* "SP":ジカン
sp_scrl( 87, 56, 44,&H24F,3-(inft*3)) /* "SP":':'
TIM_P1() /* ケイカジカン ヒョウジ
HELP_DIS() /* ヘルプ ヒョウジ
endfunc
/*[G]= -: Game Start :- ====
/*====------------------====
func GAME_ST()
char min,sec
tim_w=recd / 60
min=tim_w / 60
sec=tim_w mod 60
sp_col2( 1,0, 0) /* ヒント ヲ ケス
sp_col2( 2,0, 0)
sp_col2( 4,0, 0)
sp_col2( 5,0, 0)
sp_out()
vpage(3) : sp_disp(1) : TX_DISP(1)
play_zmd(15+bgm_no) /* play "game bgm"
for i=0 to 5 : v_disp() : next
for i=0 to 8
wk0=16-(i shl 1)
wk1=32-(i shl 2)
sp_scrl( 0,116-wk1,136,&H369,3) /* "SP":start!
sp_scrl( 1,124-wk0,136,&H36A,3)
sp_scrl( 2,132-(8-i),136,&H363,3)
sp_scrl( 3,140+(8-i),136,&H364,3)
sp_scrl( 4,148+wk0,136,&H36A,3)
sp_scrl( 5,156+wk1,136,&H33E,3)
sp_scrl( 6,112-wk1,136,&H869,3)
sp_scrl( 7,122-wk0,136,&H86A,3)
sp_scrl( 8,131-(8-i),136,&H863,3)
sp_scrl( 9,141+(8-i),136,&H864,3)
sp_scrl( 10,150+wk0,136,&H86A,3)
sp_scrl( 11,160+wk1,136,&H83E,3)
sp_scrl( 12, 16, 88,&H56A,3) /* "SP":try
sp_scrl( 13, 16+i, 88,&H564,3)
sp_scrl( 14, 16+(i shl 1), 88,&H52F,3)
SSP2( 15, 16+(i shl 2), 88,try_c,&H720,3)
sp_scrl( 17, 16,104,&H564,3) /* "SP":record
sp_scrl( 18, 16+i,104,&H562,3)
sp_scrl( 19, 16+(i shl 1),104,&H560,3)
sp_scrl( 20, 16+i*3,104,&H567,3)
sp_scrl( 21, 16+(i shl 2),104,&H564,3)
sp_scrl( 22, 16+i*5,104,&H52D,3)
sp_scrl( 25, 16+i*9,104,&H557,3)
SSP2( 23, 16+i*7,104,min,&H720,0)
SSP2( 26, 16+i*10,104,sec,&H720,3)
sp_out()
next
sp_scrl(6,0,0,0,0)
sp_scrl(7,0,0,0,0)
sp_scrl(8,0,0,0,0)
sp_scrl(9,0,0,0,0)
sp_scrl(10,0,0,0,0)
sp_scrl(11,0,0,0,0)
sp_out()
PRS_BT( 28,240,240) /* press button
sp_palet( 0,PAL, 0)
for i=0 to 27
sp_scrl(i,0,0,0,0)
next
sp_out()
endfunc
/*[E]= -: Editor :- ====
/*====--------------====
func EDITOR()
home(0, 0, 0) : home(1, 0, 0)
/*---- -: Edit Data Init. :- ----
pen_mode=0
pen_c=0
stage=0
EDIT_ALL_INIT(0)
/*---- -: Screen Make :- ----
apage(1) /* active "1" make.
for i=0 to 7 /* back 2
wk0=(i shl 5)+256
for j=0 to 7
wk1=(j shl 5)
put(wk1 ,wk0 ,wk1+15,wk0+15,BK2)
put(wk1 ,wk0+16,wk1+15,wk0+31,BK2_)
put(wk1+16,wk0 ,wk1+31,wk0+15,BK2_)
put(wk1+16,wk0+16,wk1+31,wk0+31,BK2)
next
next
apage(0) /* active "0" make.
/* fill( 4, 4, 69, 67, 0) /* sample clear
box( 4, 4, 35, 35, 6,&H5555) /* "bit" smp.
box( 38, 4, 69, 35, 6,&H5555) /* "pic" smp.
fill( 6, 38, 69, 69,177) /* para. win.
for i=0 to 3
put( 4+(i shl 4), 36, 19+(i shl 4), 51,BK0)
put( 4+(i shl 4), 52, 19+(i shl 4), 67,BK0)
next
EDIT_DIS()
KEISEN()
tfill( 4, 36, 67, 67, 8) /* para. win. ワク
tfill( 5, 37, 66, 66,15)
tfill( 6, 38, 65, 65, 8)
tfill( 7, 39, 64, 64, 0)
TFP( 8, 40,"X\01a") /* x ザヒョウ
TSP( 48, 40,xsize)
TFP( 8, 48,"Y\01a") /* y ザヒョウ
TSP( 48, 48,ysize)
TFP( 8, 56,"de") /* active color
apage(0)
fill( 25, 57, 31, 63, 16)
fill( 24, 56, 30, 62, 24+(pen_c shl 1))
TFP( 32, 56,"fg") /* pen mode
TFP( 48, 56,"BT")
apage(1)
get( 73, 73,102,102,wkA)
play_zmd(23)
PX_MAIN()
SCR_ALL_OFF()
endfunc
/*==== -: Rule :- ====
/*====------------====
func RULE()
/*---- -: Screen Make :- ----
stage=0
G_INIT()
BK_PAL_SET()
sp_scrl( 24, 24,204,&H145,3) /* "SP":ピクチャークロスワード
sp_scrl( 25, 40,204,&H149,3)
sp_scrl( 26, 56,204,&H14B,3)
for i=0 to 3 /* "SP":PX logo
sp_scrl( 34+i, 16+(i shl 4),224,&H370+i,3)
sp_scrl( 38+i, 16+(i shl 4),240,&H374+i,3)
sp_scrl( 42+i, 20+(i shl 4),228,&H470+i,3)
sp_scrl( 46+i, 20+(i shl 4),244,&H474+i,3)
sp_scrl( 50+i, 12+(i shl 4),220,&H570+i,3)
sp_scrl( 54+i, 12+(i shl 4),236,&H574+i,3)
next
sp_out()
/*---- -: text put :- ----
apage(0)
for i=0 to 4
fill(120+i, 0,255,255,193-(i shl 2))
next
line(120,0,120,255,197,&HAAAA)
line(121,0,121,255,193,&H5555)
line(122,0,122,255,189,&HAAAA)
line(123,0,123,255,185,&H5555)
for i=0 to 127
line(124,(i shl 1) ,255,(i shl 1) ,181,&HAAAA)
line(124,(i shl 1)+1,255,(i shl 1)+1,181,&H5555)
next
for i=0 to 63
get(376,256+(i shl 2),511,259+(i shl 2),wkA)
tput(120,i shl 2,136,4,wkA,"pset")
next
for i=0 to 17
line( 0,191+i, 64-i,255,rb_p(i))
next
tim_c=0
vpage(3) : sp_disp(1) : TX_DISP(1)
play_zmd(12) /* play "rule bgm"
contrast(15)
kb_cls()
bton=kstrig(1)
while tim_c <> 900
if g_mode = 3 then tim_c=tim_c+1
ST_INP()
if kyb = &H1B then break /* ret. to title
/*---- -: push anime :- ----
piko(0)=piko(0)+1 and 15
if piko(0) = 0 then {
piko(1)=piko(1)+1 and 1
sp_scrl( 0,256,244+(piko(1) shl 1),&H16F,3)
sp_scrl( 1,256,256,&H16D+piko(1),3)
}
/*++++ -: ボタン ガ オサレタトキ :- ++++
if bton = 0 and BT1 <> 0 then {
play_se(3)
break
}
if bton <> BT1 then bton=0
sp_out()
endwhile
m_fadeout(40)
SCR_ALL_OFF()
endfunc
func RULE_S1(y;int,tm;char,hd;int)
for i=0 to tm
wk0=R_TXT(hd+i) shr 1
wk1=R_TXT(hd+i) and 1
wk2=380+(i shl 3)
sp_pcg(&H3F,PCG1,&H98+wk0)
sp_out()
sp_pat(&HFC+(wk1 shl 1),wk9,0)
put(wk2,y ,wk2+7,y+ 7,wk9)
sp_pat(&HFD+(wk1 shl 1),wk9,0)
put(wk2,y+ 8,wk2+7,y+15,wk9)
next
endfunc
/*==== -: PX Main :- ====
/*====---------------====
/* use sp.plane : 100 > トンカチ
/* : 101 > クイ
/* : 104,5,6,7 > spark
/* : 108-115 > crush
/* : 116,7,8 > cursole(m,x,y)
func PX_MAIN()
cx=0 : cx_=cx*6
cy=0 : cy_=cy*6
if g_mode = 0 then {
X_LC1()
Y_LC1()
}
sp_scrl(101,cx_+ 88,cy_+ 80,&H150+pen_mode,3) /* "SP":pick
sp_scrl(116,cx_+ 84,cy_+ 84,&H140,3) /* "SP":cs(m)
sp_out()
vpage(3) : sp_disp(1) : TX_DISP(1)
/*---- -: "PX" Game/Edit Main :- ----
kb_cls()
ston=&HFF
sths=&HFF
bton=kstrig(1)
while 1
ST_INP()
if kyb = &H1B then break /* ret. to title
/*---- -: カーソル カラー グラデーション :- ----
cs_grd=cs_grd+1 and 31
if (cs_grd and 3) = 3 then {
sp_col2( 6,(30-(cs_grd shr 2)) shl 6, 1)
}
/*---- -: ケイカジカン ケイソク :- ----
if g_mode = 0 then {
tim_c=tim_c+1
if tim_c >= &H57E3F then g_mode=99
TIM_P1()
}
/*++++ -: カーソル イドウ :- ++++
cxn=cx
cyn=cy
if ston = 0 then {
if ST1 <> 0 and sths = ST1 then {
cx=cx+mvof(ST1)
if cx = &HFF then { /* ハミデタラ ヒントチェック ヘ
if g_mode = 0 then XHNT_MK()
cx=0
}
if cx = xsize then cx=xsize-1
cy=cy+mvof(ST1+10)
if cy = &HFF then { /* ハミデタラ ヒントチェック ヘ
if g_mode = 0 then YHNT_MK()
cy=0
}
if cy = ysize then cy=ysize-1
cx_=cx*6
cy_=cy*6
if cx <> cxn or cy <> cyn then {
play_se(1)
sp_scrl(101,cx_+ 88,cy_+ 80,&H150+pen_mode,3) /* "SP":pick
sp_scrl(116,cx_+ 84,cy_+ 84,&H140,3) /* "SP":cs(m)
if g_mode = 0 then {
if cx <> cxn then X_LC1()
if cy <> cyn then Y_LC1()
tim_c=tim_c+1
}
if g_mode = 1 then {
TSP( 24, 40,cx+1)
TSP( 24, 48,cy+1)
}
if BT1 <> 0 then bton=0
}
}
}
if bton = 0 then {
/*++++ -: "A" or "B" ボタン ガ オサレタトキ :- ++++
if BT1 = 1 or BT1 = 2 then {
if g_mode = 0 then {
NML_BLK_P(0)
sp_scrl(104,0,0,0,0) /* "SP":spark
sp_scrl(105,0,0,0,0)
}
if g_mode = 1 then {
if pen_mode = 0 then CLBK_BIT()
if pen_mode = 1 then CLBK_PIC()
}
bton=BT1
}
/*++++ -: ボタン ガ ドウジニ オサレタバアイ :- ++++
if BT1 = 3 or kyb = &H20 or kyb = &H0D then {
play_se(7)
if g_mode = 0 then HELP(0)
if g_mode = 1 then TOOLS()
bton=BT1
}
}
/*---- -: イロイロ ハンテイ :- ----
if g_mode = 0 and dbg = 1 then {
if kyb = &H47 or kyb = &H67 then g_mode=99 /* "G":キョウセイ ゲーム オーバー
if kyb = &H43 or kyb = &H63 then stg_cmp=900 /* "C":キョウセイ クリア!
}
if g_mode = 1 then {
if kyb = &H50 or kyb = &H70 then { /* "P":pen mode change
play_se(1)
pen_mode=pen_mode+1 and 1
if pen_mode = 0 then {
TFP( 48, 56,"BT")
} else {
TFP( 48, 56,"PC")
}
sp_scrl(101,cx_+ 88,cy_+ 80,&H150+pen_mode,3) /* "SP":pick
}
}
if g_mode = 0 and stg_cmp = 900 then break /* クリア!
if g_mode = 99 then break /* ゲーム オーバー
if kyb = &H1B then break /* return to title
/*++++ -: スティック ノ ニュウリョク アトショリ :- ++++
ST_CK2(16,1)
/*++++ -: ボタン ノ ニュウリョク アトショリ :- ++++
if bton <> BT1 then {
bton=0
flg_on_mode=0
if g_mode = 0 then {
sp_scrl(100,0,0,0,0) /* "SP":トンカチ
sp_scrl(101,cx_+ 88,cy_+ 80,&H150,3) /* "SP":pick'
}
}
sp_out()
endwhile
if kyb <> &H1B and p_mode = 0 then {
if g_mode = 0 or g_mode = 99 then {
/*---- -: ナンカイメ ノ プレイ :- ----
if try_c <= 98 then try_c=try_c+1
stg_data((stage shl 9)+ 35)=try_c
if p_mode = 0 and dbg = 0 and dskok = 1 then { /* save
wk0=fopen(stg_fl+".DAT","w")
/* fwrite(stg_data,51200,wk0)
fseek(wk0,(stage shl 9)+ 35,0)
fputc(try_c,wk0)
fclose(wk0)
}
}
}
endfunc
/*[G]= -: Line Cursole :- ====
/*====--------------------====
func X_LC1()
apage(0)
fill(cxn*6+ 73, 3,cxn*6+ 78, 68, 0) /* line cuesole
fill(cx_ + 73, 3,cx_ + 78, 68, 19)
sp_scrl(117,cx_+ 84, 79,&H142,3) /* "SP":cs(y)
endfunc
func Y_LC1()
apage(0)
fill( 3,cyn*6+ 73, 68,cyn*6+ 78, 0) /* line cursole
fill( 3,cy_ + 73, 68,cy_ + 78, 19)
sp_scrl(118, 79,cy_+ 84,&H143,3) /* "SP":cs(x)
endfunc
/*[G]= -: X-Line Hint Marking :- ====
/*====---------------------------====
func XHNT_MK()
/*---- -: カーソル ナドヲ ショウキョ :- ----
sp_scrl(100,0,0,0,0) /* "SP":hanmer
sp_scrl(101,0,0,0,0) /* "SP":pick
sp_scrl(116,0,0,0,0) /* "SP":cs(m)
sp_scrl(117,0,0,0,0) /* "SP":cs(y)
/* sp_scrl(118,0,0,0,0) /* "SP":cs(x)
apage(0)
fill( 73, 3,252, 68, 0) /* line cursole clear
fill( 3, 73, 68,252, 0)
px=10
cx_=px*6
py=cy
cy_=py*6
fill( 73,cy_+ 73,xsize*6+ 72,cy_+ 77, 19) /* line cursole
sp_scrl(101,cx_+ 20,cy_+ 78,&H141,3) /* "SP":pencil
sp_scrl(118, 79,cy_+ 84,&H143,3) /* "SP":cs(x)
sp_out()
play_se(1)
/*---- -: ヨコ ノ ヒント マーキング メイン :- ----
kb_cls()
ston=&HFF
/* sths=&HFF
bton=kstrig(1)
while 1
ST_INP()
if kyb = &H1B then break /* ret. to title
/*---- -: カーソル カラー グラデーション :- ----
cs_grd=cs_grd+1 and 31
if (cs_grd and 3) = 3 then {
sp_col2( 6,(30-(cs_grd shr 2)) shl 6, 1)
}
/*---- -: ケイカジカン ケイソク :- ----
tim_c=tim_c+1
if tim_c >= &H57E3F then {
g_mode=99
break
}
TIM_P1()
/*++++ -: カーソル イドウ :- ++++
cxn=px
cyn=py
if ston = 0 then {
if ST1 <> 0 and sths = ST1 then {
px=px+mvof(ST1)
if px = &HFF then px=0
if px = 11 then break /* ハミデタラ モドル
py=py+mvof(ST1+10)
if py = &HFF then py=0
if py = ysize then py=ysize-1
cx_=px*6
cy_=py*6
if px <> cxn or py <> cyn then {
play_se(1)
apage(0)
fill( 73,cyn*6+ 73, 252,cyn*6+ 77, 0)
fill( 73,cy_ + 73,xsize*6+ 72,cy_ + 77, 19)
sp_scrl(101,cx_+ 20,cy_+ 78,&H141,3) /* "SP":pencil
sp_scrl(118, 79,cy_+ 84,&H143,3) /* "SP":cs(x)
if BT1 <> 0 then bton=0
tim_c=tim_c+1
}
}
}
if bton = 0 then {
/*++++ -: "A" ボタン ガ オサレタトキ :- ++++
if BT1 = 1 then {
wk0=hint_x(py*11+(10-px))
if wk0 <> &HFF then {
if (wk0 and &H80) = 0 then {
if flg_on_mode = 0 or flg_on_mode = 1 then {
play_se(5)
sp_pat(&H20+(wk0 and 127),wk9,0)
tput(cx_+ 3,cy_+ 73,6,6,wk9,"pset")
flg_on_mode=1
hint_x(py*11+(10-px))=wk0 xor &H80
}
} else {
if flg_on_mode = 0 or flg_on_mode = 2 then {
play_se(5)
sp_pat(&H00+(wk0 and 127),wk9,0)
tput(cx_+ 3,cy_+ 73,6,6,wk9,"pset")
flg_on_mode=2
hint_x(py*11+(10-px))=wk0 xor &H80
}
}
}
bton=BT1
}
if BT1 = 3 or kyb = &H20 or kyb = &H0D then {
play_se(7)
HELP(1)
bton=BT1
}
}
/*---- -: イロイロ ハンテイ :- ----
if dbg = 1 then {
if kyb = &H47 or kyb = &H67 then g_mode=99 /* "G":キョウセイ ゲーム オーバー
if kyb = &H43 or kyb = &H63 then stg_cmp=900 /* "C":キョウセイ クリア!
}
if g_mode = 0 and stg_cmp = 900 then break /* クリア!
if g_mode = 99 then break /* ゲーム オーバー
if kyb = &H1B then break /* ret. to title
/*++++ -: スティック ノ ニュウリョク アトショリ :- ++++
ST_CK2(16,1)
/*++++ -: ボタン ノ ニュウリョク アトショリ :- ++++
if bton <> BT1 then {
bton=0
flg_on_mode=0
}
sp_out()
endwhile
cy=py
apage(0)
fill( 73,cy_+ 73,252,cy_+ 78, 0)
if kyb = &H1B or g_mode = 99 or stg_cmp = 900 then return()
Y_LC1()
sp_out()
endfunc
/*[G]= -: Y-Line Hint Marking :- ====
/*====---------------------------====
func YHNT_MK()
/*---- -: カーソル ナドヲ ショウキョ :- ----
sp_scrl(100,0,0,0,0) /* "SP":hanmer
sp_scrl(101,0,0,0,0) /* "SP":pick
sp_scrl(116,0,0,0,0) /* "SP":cs(m)
/* sp_scrl(117,0,0,0,0) /* "SP":cs(y)
sp_scrl(118,0,0,0,0) /* "SP":cs(x)
apage(0)
fill( 73, 3,252, 68, 0) /* line cursole clear
fill( 3, 73, 68,252, 0)
px=cx
cx_=px*6
py=10
cy_=py*6
fill(cx_+ 73, 73,cx_+ 77,ysize*6+ 72, 19) /* line cursole
sp_scrl(101,cx_+ 90,cy_+ 8,&H141,3) /* "SP":pencil
sp_scrl(117,cx_+ 84, 79,&H142,3) /* "SP":cs(y)
sp_out()
play_se(1)
/*---- -: タテ ノ ヒント マーキング メイン :- ----
ston=&HFF
/* sths=&HFF
bton=kstrig(1)
while 1
ST_INP()
if kyb = &H1B then break /* return to title
/*---- -: カーソル カラー グラデーション :- ----
cs_grd=cs_grd+1 and 31
if (cs_grd and 3) = 3 then {
sp_col2( 6,(30-(cs_grd shr 2)) shl 6, 1)
}
/*---- -: ケイカジカン ケイソク :- ----
tim_c=tim_c+1
if tim_c >= &H57E3F then {
g_mode=99
break
}
TIM_P1()
/*++++ -: カーソル イドウ :- ++++
cxn=px
cyn=py
if ston = 0 then {
if ST1 <> 0 and sths = ST1 then {
px=px+mvof(ST1)
py=py+mvof(ST1+10)
if px = &HFF then px=0
if px = xsize then px=xsize-1
if py = &HFF then py=0
if py = 11 then break /* ハミデタラ モドル
cx_=px*6
cy_=py*6
if px <> cxn or py <> cyn then {
play_se(1)
apage(0)
fill(cxn*6+ 73, 73,cxn*6+ 77, 252, 0)
fill(cx_ + 73, 73,cx_ + 77,ysize*6+ 72, 19)
sp_scrl(101,cx_+ 90,cy_+ 8,&H141,3) /* "SP":pencil
sp_scrl(117,cx_+ 84, 79,&H142,3) /* "SP":cs(y)
if BT1 <> 0 then bton=0
tim_c=tim_c+1
}
}
}
if bton = 0 then {
/*++++ -: "A" ボタン ガ オサレタトキ :- ++++
if BT1 = 1 then {
wk0=hint_y(px*11+(10-py))
if wk0 <> &HFF then {
if (wk0 shr 7) = 0 then {
if flg_on_mode = 0 or flg_on_mode = 1 then {
play_se(5)
sp_pat(&H20+(wk0 and 127),wk9,0)
tput(cx_+ 73,cy_+ 3,6,6,wk9,"pset")
flg_on_mode=1
hint_y(px*11+(10-py))=wk0 xor &H80
}
} else {
if flg_on_mode = 0 or flg_on_mode = 2 then {
play_se(5)
sp_pat(&H00+(wk0 and 127),wk9,0)
tput(cx_+ 73,cy_+ 3,6,6,wk9,"pset")
flg_on_mode=2
hint_y(px*11+(10-py))=wk0 xor &H80
}
}
}
bton=BT1
}
if BT1 = 3 or kyb = &H20 or kyb = &H0D then {
play_se(7)
HELP(2)
bton=BT1
}
}
/*---- -: イロイロ ハンテイ :- ----
if dbg = 1 then {
if kyb = &H47 or kyb = &H67 then g_mode=99 /* "G":キョウセイ ゲーム オーバー
if kyb = &H43 or kyb = &H63 then stg_cmp=900 /* "C":キョウセイ クリア!
}
if g_mode = 0 and stg_cmp = 900 then break /* クリア!
if g_mode = 99 then break /* ゲーム オーバー
if kyb = &H1B then break /* ret. to title
/*++++ -: スティック ノ ニュウリョク アトショリ :- ++++
ST_CK2(16,1)
/*++++ -: ボタン ノ ニュウリョク アトショリ :- ++++
if bton <> BT1 then {
bton=0
flg_on_mode=0
}
sp_out()
endwhile
cx=px
apage(0)
fill(cx_+ 73, 73,cx_+ 78,252, 0)
if kyb = &H1B or g_mode = 99 or stg_cmp = 900 then return()
X_LC1()
sp_out()
endfunc
/*[G]= -: Help Point Display :- ====
/*====--------------------------====
func HELP_DIS()
wk0=(help_p shr 1)
tfill( 11, 57, 60, 59, 0)
if help_p >= 2 then {
tline( 11, 57, 10+wk0, 57,10)
tline( 11, 58, 10+wk0, 58, 9)
tline( 11, 59, 10+wk0, 59,11)
}
endfunc
/*[G]= -: Help(select window) : - ====
/*====----------------------------====
func HELP(fl;char)
/*---- -: カーソル ナドヲ ショウキョ :- ----
sp_scrl(100,0,0,0,0) /* "SP":hanmer
sp_scrl(101,0,0,0,0) /* "SP":pick
sp_scrl(116,0,0,0,0) /* "SP":cs(m)
sp_scrl(117,0,0,0,0) /* "SP":cs(y)
sp_scrl(118,0,0,0,0) /* "SP":cs(x)
apage(0)
fill( 73, 3,252, 68, 0) /* line cursole clear
fill( 3, 73, 68,252, 0)
fill( 73, 73,252,252, 0)
tfill( 72, 72,255,255, 0) /* ケイセン clear
sp_col2( 1,0, 0) /* ヒント ヲ ケス
sp_col2( 2,0, 0)
sp_col2( 4,0, 0)
sp_col2( 5,0, 0)
sp_out()
HELP_MK() /* window make
sp_pat(&H50,wk9,0)
tput(100,108,8,8,wk9,"pset")
tline(108,116,155,116, 9)
cmy=0
bgm_no_bk=bgm_no
/*---- -: Help Main :- ----
kb_cls()
ston=&HFF
sths=&HFF
bton=kstrig(1)
while 1
ST_INP()
if kyb = &H1B then break /* ret. to title
/*++++ -: カーソル イドウ :- ++++
cmyn=cmy
if ston = 0 then {
if ST1 <> 0 and sths = ST1 then {
if ST1 = 2 or ST1 = 8 then {
cmy=cmy+mvof(ST1+10)
if cmy = &HFF then cmy=5
if cmy >= 6 then cmy=0
if cmy <> cmyn then {
play_se(1)
tfill(100,108+(cmyn shl 3),107,115+(cmyn shl 3), 0)
sp_pat(&H50,wk9,0)
tput(100,108+(cmy shl 3),8,8,wk9,"pset")
tline(108,(cmyn shl 3)+116,155,(cmyn shl 3)+116, 0)
tline(108,(cmy shl 3)+116,155,(cmy shl 3)+116, 9)
}
}
if ST1 = 4 or ST1 = 6 then {
/*---- -: BGM Number Select :- ----
if cmy = 1 then {
play_se(1)
bgm_no=bgm_no+mvof(ST1)
if bgm_no = &HFF then bgm_no=8
if bgm_no = 9 then bgm_no=0
if bgm_no = 8 then {
TFP(108,116,"[OFF][")
} else {
TFP(108,116,"BGM\")
TSP(140,116,bgm_no+1)
}
}
/*---- -: info. type select :- ++++
if cmy = 3 then {
play_se(1)
inft=inft+mvof(ST1) and 1
sp_pat(&H40+inft,wk9,0)
tput(148,132,8,8,wk9,"pset")
GI_S1()
}
}
}
}
if bton = 0 then {
/*++++ -: "A" ボタン ガ オサレタトキ :- ++++
if BT1 = 1 then {
/*---- -: help hint :- ----
if cmy = 2 then {
if help_p >= 20 then {
play_se(3)
bton=BT1
break
} else {
play_se(6)
}
}
/*---- -: BGM change/play :- ----
if cmy = 1 then {
play_zmd(15+bgm_no) /* play "game bgm"
bgm_no_bk=bgm_no
}
/*---- -: give up/exit :- -----
if cmy = 0 or cmy = 5 then {
play_se(3)
bton=BT1
break
}
/*---- -: save :- -----
if cmy = 4 then {
RESUME()
}
bton=BT1
}
/*++++ -: "B" ボタン ガ オサレタトキ :- ++++
if BT1 = 2 or kyb = &H20 or kyb = &H0D then {
play_se(7)
cmy=3
bton=BT1
break
}
}
/*++++ -: スティック ノ ニュウリョク アトショリ :- ++++
ST_CK2(16,2)
/*++++ -: ボタン ノ ニュウリョク アトショリ :- ++++
if bton <> BT1 then bton=0
sp_out()
endwhile
if kyb = &H1B then return() /* ret. to title
apage(0)
fill( 96, 96,161,161, 0)
tfill( 96, 96,159,159, 0)
KEISEN()
if bgm_no <> bgm_no_bk then bgm_no=bgm_no_bk
if cmy = 0 then {
g_mode=99 /* give up
return()
}
sp_palet( 0,PAL, 0)
if cmy = 2 then HELP_HINT(fl) /* help hint
if kyb = &H1B then return() /* ret. to title
if fl = 0 then {
sp_scrl(100,0,0,0,0) /* "SP":hanmer
sp_scrl(101,cx_+ 88,cy_+ 80,&H150,3) /* "SP":pick
sp_scrl(104,0,0,0,0) /* "SP":spark
sp_scrl(105,0,0,0,0)
sp_scrl(116,cx_+ 84,cy_+ 84,&H140,3) /* "SP":cs(m)
X_LC1()
Y_LC1()
}
if fl = 1 then {
sp_scrl(100,0,0,0,0) /* "SP":hanmer
sp_scrl(101,cx_+ 20,cy_+ 78,&H141,3) /* "SP":pencil
sp_scrl(104,0,0,0,0)
sp_scrl(105,0,0,0,0)
sp_scrl(116,0,0,0,0) /* "SP":cs(m)
sp_scrl(117,0,0,0,0) /* "SP":cs(y)
sp_scrl(118, 79,cy_+ 84,&H143,3) /* "SP":cs(x)
apage(0)
fill( 73,cy_+ 73,xsize*6+ 72,cy_+ 77, 19) /* line cursole
}
if fl = 2 then {
sp_scrl(100,0,0,0,0) /* "SP":hanmer
sp_scrl(101,cx_+ 90,cy_+ 8,&H141,3) /* "SP":pencil
sp_scrl(104,0,0,0,0)
sp_scrl(105,0,0,0,0)
sp_scrl(116,0,0,0,0) /* "SP":cs(m)
sp_scrl(117,cx_+ 84, 79,&H142,3) /* "SP":cs(y)
sp_scrl(118,0,0,0,0) /* "SP":cs(x)
apage(0)
fill(cx_+ 73, 73,cx_+ 77,ysize*6+ 72, 19) /* line cursole
}
sp_out()
endfunc
/*[G]= -: Help Window Make :- ====
/*====------------------------====
func HELP_MK()
apage(0)
fill( 98, 98,161,161,177)
for i=0 to 3
wk0=96+(i shl 4)
for j=0 to 3
wk1=96+(j shl 4)
put(wk1,wk0,wk1+15,wk0+15,BK0)
next
next
tfill( 96, 96,159,159, 8)
tfill( 97, 97,158,158,15)
tfill( 98, 98,157,157, 8)
tfill( 99, 99,156,156, 0)
TFP(104,100,"hHELPh")
TFP(114,108,"I")
TFP(108,108,"G")
TFP(120,108,"VE")
TFP(140,108,"UP")
if bgm_no = 8 then {
TFP(108,116,"[OFF][")
} else {
TFP(108,116,"BGM\")
TSP(140,116,bgm_no+1)
}
if help_p >= 20 then {
TFP(114,124,"I")
TFP(108,124,"H")
TFP(120,124,"NT")
TFP(140,124,"OK")
} else {
TFP(108,124,"iiii")
}
TFP(108,132,"INFO]")
sp_pat(&H40+inft,wk9,0)
tput(148,132,8,8,wk9,"pset")
TFP(108,140,"SAVE")
TFP(108,148,"EXIT")
endfunc
/*[G]= -: Help Hint :- ====
/*====-----------------====
func HELP_HINT(fl;char)
if fl = 1 then {
cx=0 : cx_=cx*6
cy=py : cx_=cy*6
}
if fl = 2 then {
cx=px : cx_=cx*6
cy=0 : cy_=cy*6
}
sp_scrl(117,cx_+ 84, 79,&H142,3) /* "SP":cs(y)
sp_scrl(118, 79,cy_+ 84,&H143,3) /* "SP":cs(x)
fill( 73,cy_+ 73,xsize*6+ 72,cy_+ 77, 19) /* ヨコ ノ ライン
fill(cx_+ 73, 73,cx_+ 77,ysize*6+ 72, 19) /* タテ ノ ライン
sp_out()
/*---- -: Help Hint Main :- ----
kb_cls()
ston=&HFF
sths=&HFF
bton=kstrig(1)
while 1
ST_INP()
if kyb = &H1B then break /* ret. to title
/*---- -: カーソル カラー グラデーション :- ----
cs_grd=cs_grd+1 and 31
if (cs_grd and 3) = 3 then {
sp_col2( 6,(30-(cs_grd shr 2)) shl 6, 1)
}
/*++++ -: カーソル イドウ :- ++++
cxn=cx
cyn=cy
if ston = 0 then {
if ST1 <> 0 and sths = ST1 then {
cx=cx+mvof(ST1)
cy=cy+mvof(ST1+10)
if cx = &HFF then cx=0
if cx = xsize then cx=xsize-1
if cy = &HFF then cy=0
if cy = ysize then cy=ysize-1
cx_=cx*6
cy_=cy*6
if cx <> cxn or cy <> cyn then {
play_se(1)
sp_scrl(117,cx_+ 84, 79,&H142,3) /* "SP":cs(y)
sp_scrl(118, 79,cy_+ 84,&H143,3) /* "SP":cs(x)
/* v_disp()
fill( 73,cyn*6+ 73,xsize*6+ 72,cyn*6+ 77, 0) /* ヨコ ケシ
fill(cxn*6+ 73, 73,cxn*6+ 77,ysize*6+ 72, 0) /* タテ ケシ
fill( 73,cy_ +73,xsize*6+ 72,cy_+ 77, 19) /* ヨコ ノ ライン
fill(cx_+ 73, 73,cx_+ 77,ysize*6+ 72, 19) /* タテ ノ ライン
}
}
}
/*++++ -: "A"/"B" ボタン ガ オサレタトキ :- ++++
if bton = 0 then {
bton=BT1
if BT1 = 1 or BT1 = 2 then break
}
/*++++ -: スティック ノ ニュウリョク アトショリ :- ++++
ST_CK2(16,2)
/*++++ -: ボタン ノ ニュウリョク アトショリ :- ++++
if bton <> BT1 then bton=0
sp_out()
endwhile
if kyb = &H1B then return() /* ret. to title
apage(0)
fill( 73, 73,252,252, 0)
if BT1 = 2 then {
play_se(2)
if fl = 1 then {
cx_=px*6
cy_=py*6
}
if fl = 2 then {
cx_=px*6
cy_=py*6
}
return() /* help hint cancel
}
play_se(3)
if dbg <> 1 then {
help_p=help_p-20
HELP_DIS()
}
/*---- -: タテ ノ ライン :- ----
cyn=cy
for i=0 to ysize-1
play_se(1)
cy=i
cy_=cy*6
if (edit_map(cy*30+cx) and 1) = 1 then BT1=1 else {
BT1=0
sp_scrl(100,0,0,0,0)
sp_scrl(101,0,0,0,0)
sp_scrl(104,0,0,0,0)
sp_scrl(105,0,0,0,0)
}
sp_scrl(101,cx_+ 88,cy_+ 80,&H150+pen_mode,3) /* "SP":pick
sp_scrl(116,cx_+ 84,cy_+ 84,&H140,3) /* "SP":cs(m)
sp_out()
if (flg_map(cy*30+cx) and 1) <> 1 then NML_BLK_P(1)
next
cy=cyn
cy_=cy*6
/*---- -: ヨコ ノ ライン :- ----
cxn=cx
for i=0 to xsize-1
play_se(1)
cx=i
cx_=cx*6
if (edit_map(cy*30+cx) and 1) = 1 then BT1=1 else {
BT1=0
sp_scrl(100,0,0,0,0)
sp_scrl(101,0,0,0,0)
sp_scrl(104,0,0,0,0)
sp_scrl(105,0,0,0,0)
}
sp_scrl(101,cx_+ 88,cy_+ 80,&H150+pen_mode,3) /* "SP":pick
sp_scrl(116,cx_+ 84,cy_+ 84,&H140,3) /* "SP":cs(m)
sp_out()
if (flg_map(cy*30+cx) and 1) <> 1 then NML_BLK_P(1)
next
cx=cxn
cx_=cx*6
BT1=kstrig(1)
if fl = 1 then {
cx_=px*6
cy_=py*6
}
if fl = 2 then {
cx_=px*6
cy_=py*6
}
endfunc
/*==== -: Resume :- ====
/*====--------------====
func RESUME()
/*---- -: カキコミ デキナイ :- ----
if dskok = 0 then {
play_se(6)
return()
}
/*---- -: ディスクヨウリョウ ガ タリナイ :- ----
if dskf(0) <= 1568 then {
play_se(6)
return()
}
play_se(3)
wk0=fopen(stg_fl+".RES","c")
fputc(stage,wk0) /* stage no.
fputc(help_p,wk0) /* help_p
fputc((stg_cmp shr 8),wk0) /* stg_cmp
fputc((stg_cmp and &HFF),wk0)
fputc((tim_c shr 24),wk0) /* tim_c
fputc((tim_c shr 16),wk0)
fputc((tim_c shr 8),wk0)
fputc((tim_c and &HFF),wk0)
fwrite(hint_x,330,wk0)
fwrite(hint_y,330,wk0)
fwrite(flg_map,900,wk0)
fclose(wk0)
TFP(140,140,"OK")
for i=0 to 11
v_disp()
next
TFP(140,140,"__")
ldok=1
endfunc
/*==== -: Resume Load :- ====
/*====-------------------====
func RES_LD1()
wk0=fopen(stg_fl+".RES","r")
stage=fgetc(wk0) /* stage no.
help_p=fgetc(wk0) /* help_p
wk1=fgetc(wk0) /* stg_cmp
stg_cmp=(wk1 shl 8)+fgetc(wk0)
wk1=fgetc(wk0) /* tim_c
wk1=(wk1 shl 8)+fgetc(wk0)
wk1=(wk1 shl 8)+fgetc(wk0)
tim_c=(wk1 shl 8)+fgetc(wk0)
fread(hint_x,330,wk0)
fread(hint_y,330,wk0)
fread(flg_map,900,wk0)
fclose(wk0)
try_c=stg_data((stage shl 9)+ 35) /* try count
recd=stg_data((stage shl 9)+ 36) shl 24 /* record
recd=recd+(stg_data((stage shl 9)+ 37) shl 16)
recd=recd+(stg_data((stage shl 9)+ 38) shl 8)
recd=recd+ stg_data((stage shl 9)+ 39)
endfunc
func RES_LD2()
tfill( 73, 3,252, 68, 0)
tfill( 3, 73, 68,252, 0)
/*---- -: X/Y hint :- ----
for i=0 to 29
for j=0 to 10
wk0=hint_x(i*11+j)
if wk0 <> &HFF then {
if (wk0 and &H80) = 0 then {
sp_pat(&H00+(wk0 and 127),wk9,0)
} else {
sp_pat(&H20+(wk0 and 127),wk9,0)
}
tput( 63-j*6,i*6+ 73,6,6,wk9,"pset")
}
wk0=hint_y(i*11+j)
if wk0 <> &HFF then {
if (wk0 and &H80) = 0 then {
sp_pat(&H00+(wk0 and 127),wk9,0)
} else {
sp_pat(&H20+(wk0 and 127),wk9,0)
}
tput(i*6+ 73, 63-j*6,6,6,wk9,"pset")
}
next
next
/*---- -: フィールド :- ----
apage(1)
fill( 8, 8, 39, 39, 4) /* sample clear
for i=0 to ysize-1
wk1=i*6
for j=0 to xsize-1
wk0=flg_map(i*30+j)
wk2=j*6
if wk0 = 1 then {
put(wk2+ 73,wk1+ 73,wk2+ 78,wk1+ 78,BLK2)
pset(j+ 9,i+ 9, 12)
}
if wk0 = 2 then {
put(wk2+ 73,wk1+ 73,wk2+ 78,wk1+ 78,BLK1)
}
next
next
svld=0
endfunc
/*[G]= -: Game Over :- ====
/*====-----------------====
/* use sp.plane : 22-37 > game over logo
/* : 30-38 > try again!
/* : 39,40 > push
func GAME_OVER()
m_fadeout(40)
/*---- -: カーソル ナドヲ ショウキョ :- ----
sp_scrl(100,0,0,0,0) /* "SP":hanmer
sp_scrl(101,0,0,0,0) /* "SP":pick
sp_scrl(116,0,0,0,0) /* "SP":cs(m)
sp_scrl(117,0,0,0,0) /* "SP":cs(y)
sp_scrl(118,0,0,0,0) /* "SP":cs(x)
sp_col2( 1,0, 0) /* ヒント ヲ ケス
sp_col2( 2,0, 0)
sp_col2( 4,0, 0)
sp_col2( 5,0, 0)
sp_out()
apage(0)
fill( 73, 3,252, 68, 0) /* line cursole clear
fill( 3, 73, 68,252, 0)
/* tfill( 72, 72,255,255, 0) /* ケイセン clear
wk0=0
for i=0 to 15
wk0=wk0+(16-i)
sp_scrl( 22,104,wk0,&H365,3) /* "SP":game over
sp_scrl( 31,112,wk0,&H863,3)
sp_scrl( 24,120,wk0,&H366,3)
sp_scrl( 33,128,wk0,&H862,3)
sp_scrl( 26,144,wk0,&H367,3)
sp_scrl( 35,152,wk0,&H868,3)
sp_scrl( 28,160,wk0,&H362,3)
sp_scrl( 37,168,wk0,&H864,3)
wk1=272-wk0
sp_scrl( 30,104,wk1,&H865,3) /* "SP":game over
sp_scrl( 23,112,wk1,&H363,3)
sp_scrl( 32,120,wk1,&H866,3)
sp_scrl( 25,128,wk1,&H362,3)
sp_scrl( 34,144,wk1,&H867,3)
sp_scrl( 27,152,wk1,&H368,3)
sp_scrl( 36,160,wk1,&H862,3)
sp_scrl( 29,168,wk1,&H364,3)
sp_out()
next
/*---- -: push :- ----
play_zmd(13) /* play "game over"
sp_scrl( 30,168,256,&H66A,3) /* "SP":try again!
sp_scrl( 31,176,256,&H664,3)
sp_scrl( 32,184,256,&H62F,3)
sp_scrl( 33,200,256,&H663,3)
sp_scrl( 34,208,256,&H665,3)
sp_scrl( 35,216,256,&H663,3)
sp_scrl( 36,224,256,&H62A,3)
sp_scrl( 37,232,256,&H62E,3)
sp_scrl( 38,240,256,&H63E,3)
PRS_BT( 39,240,240)
endfunc
/*[G]= -: Stage Clear :- ====
/*====-------------------====
/* use sp.plane : 22,23,24,25,26,27 > clear logo
/* : 30,31 > push
/* : 48 - 63 > star
func STG_CLR()
m_fadeout(40)
/*---- -: カーソル ナドヲ ショウキョ :- ----
sp_scrl(100,0,0,0,0) /* "SP":hanmer
sp_scrl(101,0,0,0,0) /* "SP":pick
sp_scrl(116,0,0,0,0) /* "SP":cs(m)
sp_scrl(117,0,0,0,0) /* "SP":cs(y)
sp_scrl(118,0,0,0,0) /* "SP":cs(x)
sp_out()
apage(0)
fill( 73, 3,252, 68, 0) /* line cursole clear
fill( 3, 73, 68,252, 0)
/* tfill( 72, 72,255,255, 0) /* ケイセン clear
for i=0 to 11 : sp_scrl(80+i,0,0,0,0) : next
sp_out()
sp_scrl( 22,116, 24,&H660,3) /* "SP":clear
sp_scrl( 23,124, 24,&H661,3)
sp_scrl( 24,132, 24,&H662,3)
sp_scrl( 25,140, 24,&H663,3)
sp_scrl( 26,148, 24,&H664,3)
sp_scrl( 27,156, 24,&H63E,3)
if p_mode = 0 then {
/*---- -: クリア シタヨ :- ----
wk0=stg_data((stage shl 9)+ 34)
if (wk0 and 1) = 0 then {
stg_data((stage shl 9)+ 34)=wk0 or 1
if p_mode = 0 and dbg = 0 and dskok = 1 then { /* save
wk1=fopen(stg_fl+".DAT","w")
/* fwrite(stg_data,51200,wk1)
fseek(wk1,(stage shl 9)+ 34,0)
fputc(wk0 or 1,wk1)
fclose(wk1)
}
}
/*---- -: record check :- ----
if tim_c < recd then {
sp_scrl( 32,160,256,&H52E,3) /* "SP":new record!
sp_scrl( 33,168,256,&H562,3)
sp_scrl( 34,176,256,&H52C,3)
sp_scrl( 35,192,256,&H564,3)
sp_scrl( 36,200,256,&H562,3)
sp_scrl( 37,208,256,&H560,3)
sp_scrl( 38,216,256,&H567,3)
sp_scrl( 39,224,256,&H564,3)
sp_scrl( 40,232,256,&H52D,3)
sp_scrl( 41,240,256,&H53E,3)
stg_data((stage shl 9)+ 36)=tim_c shr 24
stg_data((stage shl 9)+ 37)=(tim_c shr 16) and &HFF
stg_data((stage shl 9)+ 38)=(tim_c shr 8) and &HFF
stg_data((stage shl 9)+ 39)=tim_c and &HFF
if p_mode = 0 and dbg = 0 and dskok = 1 then { /* save
wk0=fopen(stg_fl+".DAT","w")
fseek(wk0,(stage shl 9)+ 36,0)
fputc(tim_c shr 24,wk0)
fputc((tim_c shr 16) and &HFF,wk0)
fputc((tim_c shr 8) and &HFF,wk0)
fputc(tim_c and &HFF,wk0)
fclose(wk0)
}
}
}
/*---- -: star para. set :- ----
for i=0 to 15
star_x(i)=rand() and &HE0 /* &HF0
star_y(i)=rand() and &HE0 /* &HF0
next
STG_CLR_S1() /* マワリ クロクスル
STG_CLR_S2() /* カンセイ コピー
/*---- -: push :- ----
play_zmd(14) /* play "stage clear"
kb_cls()
bton=kstrig(1)
while 1
ST_INP()
/*---- -: push anime :- ----
piko(0)=piko(0)+1 and 15
if piko(0) = 0 then {
piko(1)=piko(1)+1 and 1
sp_scrl( 30,256,244+(piko(1) shl 1),&H16F,3) /* "SP":hand
sp_scrl( 31,256,256,&H16D+piko(1),3) /* "SP":button
}
/*---- -: star move :- ----
for i=0 to 1
star_x(i )=star_x(i )-4 and 255
star_y(i )=star_y(i )+4 and 255
star_x(i+2)=star_x(i+2)-2 and 255
star_y(i+2)=star_y(i+2)+2 and 255
star_x(i+4)=star_x(i+4)-2 and 255
star_y(i+4)=star_y(i+4)+2 and 255
star_x(i+6)=star_x(i+6)-1 and 255
star_y(i+6)=star_y(i+6)+1 and 255
star_x(i+8)=star_x(i+8)-1 and 255
star_y(i+8)=star_y(i+8)+1 and 255
star_x(i+10)=star_x(i+10)-1 and 255
star_y(i+10)=star_y(i+10)+1 and 255
next
wk3=wk3-1 and 15
sp_scrl( 48,star_x(0)+8,star_y(0)+8,&H578+((wk3 shr 2) shl 3),3)
sp_scrl( 49,star_x(1)+8,star_y(1)+8,&H57C+((wk3 shr 2) shl 3),3)
for i=0 to 7
sp_scrl( 50+i,star_x(2+i)+8,star_y(2+i)+8,&H578+i+((wk3 shr 2) shl 3),3)
next
sp_scrl( 58,star_x(10)+8,star_y(10)+8,&H578+((wk3 shr 2) shl 3),3)
sp_scrl( 59,star_x(11)+8,star_y(11)+8,&H57A+((wk3 shr 2) shl 3),3)
/*++++ -: ボタン ガ オサレタトキ :- ++++
if bton = 0 and BT1 <> 0 then {
play_se(3)
break
}
if bton <> BT1 then bton=0
sp_out()
endwhile
v_priority("STG","01") /* プライオリティ (SP>TX>GR)
v_special(3) /* ハントウメイ (ベース+セカンド)
SCR_ALL_OFF()
sp_palet( 0,PAL, 0)
sp_out()
endfunc
func STG_CLR_S1()
int n0=384,n1=639,n2=639,xck,yck
dim char ilp(6)={0,39,24,9,5,20,35}
xck=456+xsize*6
yck=456+ysize*6
/*---- -: マスク :- ----
tfill(384,384,639,639,0) : thome(384,384)
while 1
/* v_disp()
if n0 <> 457 then {
tline(n0,384,n0,639,8)
tline(384,n0,639,n0,8)
n0=n0+1
}
if n1 <> xck then {
tline(n1,384,n1,639,8)
n1=n1-1
}
if n2 <> yck then {
tline(384,n2,639,n2,8)
n2=n2-1
}
if n0 = 457 and n1 = xck and n2 = yck then break
endwhile
/*----- -: スクロール :- ----
n0=ilp(xsize/5)
n1=ilp(ysize/5)
vpage(2)
if xsize <= 15 then {
for i=1 to n0
v_disp()
home(1,512-i,0)
thome(384-i,384)
next
n0=512-i
n2=384-i
} else {
for i=1 to n0
v_disp()
home(1,i,0)
thome(384+i,384)
next
n0=i
n2=384+i
}
if ysize <= 15 then {
for i=1 to n1
v_disp()
home(1,n0,512-i)
thome(n2,384-i)
next
} else {
for i=1 to n1
v_disp()
home(1,n0,i)
thome(n2,384+i)
next
}
endfunc
func STG_CLR_S2()
dim char a(6)={0,113,98,83,68,53,38}
char x,y
x=128-xsize*3
y=128-ysize*3
/*---- -: バック :- ----
apage(0)
fill( 0, 0,255,255, 0)
tfill( 0, 0,255,255, 0)
for i=0 to 7
tfill( 0,244-i*12,255,255-i*12,15-i)
sp_col2(15-i,rgb(12-i,8-i,14-i),0)
next
sp_out()
/*---- -: ワク :- ----
fill(x-3,y-3,x+xsize*6+3,y+ysize*6+3, 12)
fill(x-4,y-4,x+xsize*6+2,y+ysize*6+2, 4)
fill(x-1,y-1,x+xsize*6-1,y+ysize*6-1, 16)
line(x-4,y-4,x-4,y+ysize*6+2, 2,&HA5A5)
line(x-4,y-4,x+xsize*6+2,y-4, 2,&HA5A5)
/*---- -: コピー :- ----
for i=0 to ysize/5-1
wk0=i*30
for j=0 to xsize/5-1
wk1=j*30
apage(1)
get(73+wk1,73+wk0,102+wk1,102+wk0,wkA)
apage(0)
put(x+wk1,y+wk0,x+wk1+29,y+wk0+29,wkA)
next
next
v_disp()
v_priority("GST","01") /* プライオリティ (GR>SP>TX)
v_special(0) /* ハントウメイ オフ
vpage(1)
thome(0,0)
endfunc
/*==== -: Complete Picture Display :- ====
/*====--------------------------------====
/* use sp.plane : 0,1 > push
/* : 2 - 7 > plate
/* : 8 - 23 > congratulations!
/* : 24 - 26 > ピクチャークロスワード
/* : 34 - 57 > PX logo
/* : 58 - 62 > time count
func CMP_PIC_DIS()
home(0, 0, 0) : home(1,256,256)
play_zmd(12) /* play "picture display"
/*---- -: キレイニ スル :- ----
apage(1) /* active "1" make.
fill(318,278,497,457, 0) /* zoom complete
for i=0 to 23
put(312+(i shl 3),400,319+(i shl 3),463,DSP_BK)
next
for i=0 to 5
wk0=(i shl 5)+272
put(304,wk0 ,319,wk0+ 7,BK4S0)
put(304,wk0+16,319,wk0+23,BK4S1)
put(496,wk0 ,511,wk0+ 7,BK4S0)
put(496,wk0+16,511,wk0+23,BK4S1)
next
line(264,267,503,267,164) /* logo line
line(265,268,502,268,164)
line(268,271,507,271,176)
line(269,272,506,272,176)
fill(266,322,305,361,176) /* mono/color カゲ
fill(266,386,305,425,176)
put(264,320,303,359,DSP_MN) /* bit complete
put(264,384,303,423,DSP_CL) /* pic complete
/*---- -: カンセイズ ヲ ヒョウジ :- ----
wk0=xsize/5
wk1=ysize/5
TILING() /* タイルジョウニスル
apage(1)
for i=0 to ysize-1
dsp_y=dsp_of(8+wk1)+i*6-40
for j=0 to xsize-1
wk2=edit_map(i*30+j)
dsp_x=dsp_of(8+wk0)+j*6
fill(dsp_x,dsp_y,dsp_x+5,dsp_y+5, 24+(wk2 and 14))
if (wk2 and 1) = 1 then {
pset(dsp_of(wk0)+j,dsp_of(wk1)+56+i, 12)
}
pset(dsp_of(wk0)+j,dsp_of(wk1)+120+i, 24+(wk2 and 14))
next
next
/*---- -: title display :- ----
for i=0 to 11
TFP2(i*10+ 92,228,stg_name(i))
next
/*---- -: etc. objects set :- ----
sp_scrl( 2, 32,120,&H43A,3) /* "SP":mono plate
sp_scrl( 3, 48,120,&H43B,3)
sp_scrl( 4, 32,184,&H43C,3) /* "SP":color plate
sp_scrl( 5, 48,184,&H43D,3)
sp_scrl( 6,158,224,&H46B,3) /* "SP":zoom plate
sp_scrl( 7,174,224,&H46C,3)
sp_scrl( 8, 76, 16,&H360,3) /* "SP":congratulations!
sp_scrl( 9, 84, 16,&H467,3)
sp_scrl( 10, 92, 16,&H52E,3)
sp_scrl( 11,100, 16,&H665,3)
sp_scrl( 12,108, 16,&H764,3)
sp_scrl( 13,116, 16,&H863,3)
sp_scrl( 14,124, 16,&H36A,3)
sp_scrl( 15,132, 16,&H42B,3)
sp_scrl( 16,140, 16,&H561,3)
sp_scrl( 17,148, 16,&H663,3)
sp_scrl( 18,156, 16,&H76A,3)
sp_scrl( 19,164, 16,&H82A,3)
sp_scrl( 20,172, 16,&H367,3)
sp_scrl( 21,180, 16,&H42E,3)
sp_scrl( 22,188, 16,&H569,3)
sp_scrl( 23,196, 16,&H63E,3)
sp_scrl( 24, 24,212,&H145,3) /* "SP":ピクチャークロスワード
sp_scrl( 25, 40,212,&H149,3)
sp_scrl( 26, 56,212,&H14B,3)
for i=0 to 3 /* "SP":PX logo
sp_scrl( 34+i, 16+(i shl 4),232,&H370+i,3)
sp_scrl( 38+i, 16+(i shl 4),248,&H374+i,3)
sp_scrl( 42+i, 20+(i shl 4),236,&H470+i,3)
sp_scrl( 46+i, 20+(i shl 4),252,&H474+i,3)
sp_scrl( 50+i, 12+(i shl 4),228,&H570+i,3)
sp_scrl( 54+i, 12+(i shl 4),244,&H574+i,3)
next
sp_out()
/*---- -: no./time :- ----
apage(1)
fill(260,276,307,315, 62)
for i=0 to 4
wk0=(i shl 3)+276
put(260,wk0,267,wk0+7,REPT4)
put(300,wk0,307,wk0+7,REPT5)
next
for i=0 to 5
wk0=(i shl 3)+260
put(wk0,276,wk0+7,283,REPT6)
put(wk0,308,wk0+7,315,REPT7)
next
put(260,276,267,283,REPT0)
put(260,308,267,315,REPT1)
put(300,276,307,283,REPT2)
put(300,308,307,315,REPT3)
sp_scrl( 58, 24, 40,&H248,3) /* "SP":モンダイ
SSP3( 59, 36, 40,stage+1,&H230,0) /* stage
sp_scrl( 64, 40, 56,&H24F,3) /* "SP":':'
SSP2( 62, 20, 56,tim_w / 60,&H230,0) /* min.
SSP2( 65, 44, 56,tim_w mod 60,&H230,3) /* sec.
vpage(2+tile) : sp_disp(1) : TX_DISP(1)
wk1=0 /* back palet
wk2=128
/*---- -: push :- ----
kb_cls()
ston=&HFF
sths=&HFF
bton=kstrig(1)
while 1
ST_INP()
/*---- -: push anime :- ----
piko(0)=piko(0)+1 and 15
if piko(0) = 0 then {
piko(1)=piko(1)+1 and 1
sp_scrl( 30,256,244+(piko(1) shl 1),&H16F,3) /* "SP":hand
sp_scrl( 31,256,256,&H16D+piko(1),3) /* "SP":button
}
/*++++ -: タイル on/off :- ++++
if ston = 0 and ST1 <> 0 then {
tile=tile+1 and 1
vpage(2+tile)
ston=ST1
}
if ston <> ST1 then ston=0
/*++++ -: ボタン ガ オサレタトキ :- ++++
if BT1 <> 0 and bton = 0 then {
play_se(3)
break
}
if bton <> BT1 then bton=0
sp_out()
/*---- -: palet change :- ----
wk1=wk1+1 and 1023
if (wk1 and 7) = 0 then {
if (wk1 shr 9) = 0 then {
wk2=wk2+1
} else {
wk2=wk2-1
}
PL_S( 55,hsv(wk2,15,13))
PL_S( 56,hsv(wk2,15,12))
PL_S( 57,hsv(wk2,15,11))
PL_S( 58,hsv(wk2,15,10))
PL_S( 59,hsv(wk2,15, 9))
PL_S( 60,hsv(wk2,15, 8))
PL_S( 61,hsv(wk2,15, 7))
PL_S( 62,hsv(wk2,15, 6))
}
endwhile
m_fadeout(40)
SCR_ALL_OFF()
endfunc
/*[G]= -: Picture Tiling Texture :- ====
/*====------------------------------====
func TILING()
apage(0) /* タイル フウニ スル
fill( 62, 22,241,201, 0)
for i=0 to ysize-1
dsp_y=dsp_of(8+wk1)+i*6-296
for j=0 to xsize-1
dsp_x=dsp_of(8+wk0)+j*6-256
/* box(dsp_x ,dsp_y ,dsp_x+4,dsp_y+4,191)
box(dsp_x+1,dsp_y+1,dsp_x+5,dsp_y+5,177)
fill(dsp_x+1,dsp_y+1,dsp_x+4,dsp_y+4, 0)
pset(dsp_x,dsp_y,207)
next
next
endfunc
/*====--------------------------------------------------====
/*==== -: Editor :- ====
/*====--------------------------------------------------====
/*[E]= -: Edit Tools :- ====
/*====------------------====
/* use sp.plane : 104,105,106 > title input
/* 100,101 > press button
/* 104 > select palet
/* 105,106,107 > R,G,B level
/* 117,118 > hint check cursole
func TOOLS()
/*---- -: カーソル ナドヲ ショウキョ :- ----
sp_scrl(101,0,0,0,0) /* "SP":pick
sp_scrl(116,0,0,0,0) /* "SP":cs(m)
/* sp_scrl(117,0,0,0,0) /* "SP":cs(y)
/* sp_scrl(118,0,0,0,0) /* "SP":cs(x)
sp_out()
apage(0)
/* fill( 73, 3,252, 68, 0) /* line cursole clear
/* fill( 3, 73, 68,252, 0)
tfill( 72, 72,255,255, 0) /* ケイセン clear
TOOLS_DIS() /* tools window
sp_out()
sp_pat(&H50,wk9,0)
tput(132, 84,8,8,wk9,"pset")
tline(140, 92,251, 92, 9)
cmy=0
/*---- -: Tools Main :- ----
kb_cls()
ston=&HFF
sths=&HFF
bton=kstrig(1)
while 1
ST_INP()
if kyb = &H1B then break /* ret. to title
/*++++ -: カーソル イドウ :- ++++
cmyn=cmy
if ston = 0 then {
if ST1 = 2 or ST1 = 8 then {
if sths = ST1 then {
cmy=cmy+mvof(ST1+10)
if cmy = &HFF then cmy=20
if cmy = 21 then cmy=0
if cmy <> cmyn then {
play_se(1)
tfill(132,(cmyn shl 3)+ 84,139,(cmyn shl 3)+ 91, 0)
sp_pat(&H50,wk9,0)
tput(132,(cmy shl 3)+ 84,8,8,wk9,"pset")
tline(140,(cmyn shl 3)+ 92,251,(cmyn shl 3)+ 92, 0)
tline(140,(cmy shl 3)+ 92,251,(cmy shl 3)+ 92, 9)
}
}
}
/*++++ -: イジクリ マワス :- ++++
if ST1 = 4 or ST1 = 6 then {
if sths = ST1 then {
/*---- -: stage number up/down :- ----
if cmy = 0 then {
play_se(1)
stage=stage+mvof(ST1)
if stage = &HFF then stage=99
if stage = 100 then stage=0
TSP3(224, 84,stage+1)
}
/*---- -: edit mode select :- ----
if cmy = 1 then {
play_se(1)
pen_mode=pen_mode+mvof(ST1) and 1
if pen_mode = 0 then {
TFP(212, 92,"@BIT")
TFP(184,132,"BIT\")
sp_pat(&H40+flbt,wk9,0)
tput(216,132,8,8,wk9,"pset")
TFP( 48, 56,"BT")
}
if pen_mode = 1 then {
TFP(212, 92,"@PIC")
tfill(184,132,223,139, 0)
TFP( 48, 56,"PC")
}
}
/*---- -: active color select :- ----
if cmy = 2 then {
play_se(1)
pen_c=pen_c+mvof(ST1) and 7
PEN_C_SEL()
tline(140,(cmy shl 3)+ 92,251,(cmy shl 3)+ 92, 9)
}
/*---- -: active color "R" level up/down :- ----
if cmy = 3 then {
play_se(1)
pc_r=pc_r+mvof(ST1) and 31
PC_R_P()
PC_CHANGE()
}
/*---- -: active color "G" level up/down :- ----
if cmy = 4 then {
play_se(1)
pc_g=pc_g+mvof(ST1) and 31
PC_G_P()
PC_CHANGE()
}
/*---- -: active color "B" level up/down :- ----
if cmy = 5 then {
play_se(1)
pc_b=pc_b+mvof(ST1) and 31
PC_B_P()
PC_CHANGE()
}
/*---- -: フィル ビット チェンジ :- ----
if cmy = 6 and pen_mode = 0 then {
play_se(1)
flbt=flbt+1 and 1
sp_pat(&H40+flbt,wk9,0)
tput(216,132,8,8,wk9,"pset")
}
/*---- -: shift flag change :- ----
if cmy = 7 then {
play_se(1)
shf=shf+mvof(ST1) and 3
TFP(192,140,shf_s(shf))
}
/*---- -: mirror flag change :- ----
if cmy = 9 then {
play_se(1)
mir=mir+mvof(ST1) and 1
TFP(196,156,mir_s(mir))
}
/*---- -: x_size チェンジ :- ----
if cmy = 10 then {
play_se(1)
xsize=xsize+mvof(ST1)*5
if xsize = 0 then xsize=5
if xsize >= 35 then xsize=30
TSP(196,164,xsize) /* tools win
TSP( 48, 40,xsize) /* para. win
XSIZE_C()
}
/*---- -: y_size チェンジ :- ----
if cmy = 11 then {
play_se(1)
ysize=ysize+mvof(ST1)*5
if ysize = 0 then ysize=5
if ysize >= 35 then ysize=30
TSP(196,172,ysize) /* tools win
TSP( 48, 48,ysize) /* para. win
YSIZE_C()
}
}
}
}
if BT1 = 1 then {
/*++++ -: "A"ボタン ガ オサレタトキ :- ++++
if bton = 0 then {
if cmy = 6 then EDIT_FILL() /* -: fill :-
if cmy = 7 then SHIFT() /* -: edit data shift :-
if cmy = 8 then EDIT_XOR() /* -: edit data reverse :-
/* if cmy = 9 then SWAP() /* -: edit data swap :-
if cmy = 9 then MIRROR() /* -: edit data mirror :-
if cmy = 12 then EDIT_ALL_INIT(1) /* -: edit all init :-
if cmy = 13 then EDIT_PAL_DEF() /* -: edit palet >>> defalt :-
if cmy = 14 then HINT_CHECK() /* -: edit data hint check :-
if cmy = 15 then STG_TIT_IN() /* -: title input :-
if cmy = 16 then EDIT_SAVE(1) /* -: edit_data >>> user_data :-
if cmy = 17 then EDIT_LOAD() /* -: edit_data <<< user_data :-
if cmy = 18 then DATA_SAVE() /* -: user_data save :-
if cmy = 19 then DATA_LOAD() /* -: user_data load :-
bton=BT1
if cmy = 20 then { /* -: return to title :-
play_se(3)
kyb=&H1B
break
}
}
}
/*++++ -: tools exit :- ++++
if BT1 >= 2 or kyb = &H20 or kyb = &H0D then {
if bton = 0 then {
play_se(7)
bton=BT1
break
}
}
/*++++ -: スティック ノ ニュウリョク アトショリ :- ++++
ST_CK2(16,2)
/*++++ -: ボタン ノ ニュウリョク アトショリ :- ++++
if bton <> BT1 then bton=0
sp_out()
endwhile
apage(0)
fill(128, 80,255,255, 0)
tfill(128, 80,255,255, 0)
KEISEN()
if cx >= xsize then {
cx=xsize-1
cx_=cx*6
TSP( 24, 40,cx+1)
}
if cy >= ysize then {
cy=ysize-1
cy_=cy*6
TSP( 24, 48,cy+1)
}
sp_scrl(101,cx_+ 88,cy_+ 80,&H150+pen_mode,3) /* "SP":pick/pen
sp_scrl(116,cx_+ 84,cy_+ 84,&H140,3) /* "SP":cs(m)
sp_scrl(104,0,0,0,0)
sp_scrl(105,0,0,0,0)
sp_scrl(106,0,0,0,0)
sp_scrl(107,0,0,0,0)
sp_scrl(117,0,0,0,0)
sp_scrl(118,0,0,0,0)
sp_out()
endfunc
/*[E]= -: Tools Display Make :- ====
/*====--------------------------====
func TOOLS_DIS()
/*---- -: tools window open -: ----
apage(0)
for i=0 to 10
wk0=80+(i shl 4)
for j=0 to 7
wk1=128+(j shl 4)
put(wk1,wk0,wk1+15,wk0+15,BK0)
next
next
tfill(128, 80,255,255, 8)
tfill(129, 81,254,254,15)
tfill(130, 82,253,253, 8)
tfill(131, 83,252,252, 0)
/*---- -: command list :- ----
TFP(140, 84,"TARGET") /* TARGET STG:000
TFP(192, 84,"STG\")
TSP3(224, 84,stage+1)
TFP(140, 92,"EDIT") /* EDIT MODE>BIT
TFP(176, 92,"MODE")
if pen_mode = 0 then TFP(212, 92,"@BIT")
if pen_mode = 1 then TFP(212, 92,"@PIC")
TFP(140,100,"COLOR") /* COLOR
apage(0)
for i=0 to 7
fill(189+(i shl 3),101,195+(i shl 3),107, 16)
fill(188+(i shl 3),100,194+(i shl 3),106, 24+(i shl 1))
next
TFP(140,108,"R")
TFP(140,116,"G")
TFP(140,124,"B")
for i=0 to 2 /* R,G,B レベル ゲージ
for j=0 to 31
tpset(164+(j shl 1),111+(i shl 3),15)
tpset(165+(j shl 1),112+(i shl 3), 1)
next
tpset(164,110+(i shl 3),15)
tpset(165,111+(i shl 3), 1)
for j=0 to 3
tpset(178+(j shl 4),110+(i shl 3),15)
tpset(178+(j shl 4),111+(i shl 3), 1)
next
next
fill(229,109,251,123, 16)
PEN_C_SEL()
TFP(140,132,"FILL") /* FILL
if pen_mode = 0 then {
TFP(184,132,"BIT\") /* BIT:0
sp_pat(&H40+flbt,wk9,0)
tput(216,132,8,8,wk9,"pset")
}
TFP(140,140,"SHIFT") /* SHIFT
TFP(184,140,"@"+shf_s(shf))
TFP(140,148,"BIT") /* BIT REVERSE
TFP(168,148,"REVERSE")
/* TFP(140,156,"SWAP") /* SWAP
/* TFP(200,156,"^")
/* TSP3(176,156,swp_s0)
/* TSP3(208,156,swp_s1)
TFP(140,156,"MIRROR") /* MIRROR
TFP(196,156,mir_s(mir))
TFP(140,164,"X[SIZE\") /* X-SIZE:
TSP(196,164,xsize)
TFP(140,172,"Y[SIZE\") /* Y-SIZE:
TSP(196,172,ysize)
TFP(140,180,"EDIT") /* EDIT ALL INIT.
TFP(176,180,"ALL")
TFP(204,180,"INIT]")
TFP(140,188,"DEFALT") /* DEFALT PALET
TFP(192,188,"PALET")
TFP(140,196,"HINT") /* HINT CHECK
TFP(176,196,"CHECK")
TFP(140,204,"TITLE") /* TITLE INPUT
TFP(184,204,"INPUT")
TFP(140,212,"EDIT") /* EDIT SAVE
TFP(176,212,"SAVE")
TFP(140,220,"EDIT") /* EDIT LOAD
TFP(176,220,"LOAD")
TFP(140,228,"DATA") /* DATA SAVE
TFP(176,228,"SAVE")
TFP(140,236,"DATA") /* DATA LOAD
TFP(176,236,"LOAD")
TFP(140,244,"RETURN") /* RETURN TO TITLE
TFP(192,244,"TO")
TFP(212,244,"TITLE")
endfunc
/*[E]= -: Active Color :- ====
/*====--------------------====
func PEN_C_SEL()
/*---- -: active color display :- ----
sp_scrl(104,200+(pen_c shl 3),112,&H146,3) /* "SP":active color
apage(0)
fill(228,108,250,130, 24+(pen_c shl 1)) /* tools win
fill( 24, 56, 30, 62, 24+(pen_c shl 1)) /* para, win
sp_col2( 7,edit_palet(pen_c), 1)
/*-:- パレット ジョウホウ ヨミコミ -:-
wk0=edit_palet(pen_c)
pc_r=(wk0 shr 6) and 31
pc_g= wk0 shr 11
pc_b=(wk0 shr 1) and 31
/*-:- R,G,B level disp. -:-
PC_R_P()
PC_G_P()
PC_B_P()
endfunc
func PC_R_P()
TSP(148,108,pc_r)
sp_scrl(105,173+(pc_r shl 1),120,&H147,3) /* "SP":"R" level
endfunc
func PC_G_P()
TSP(148,116,pc_g)
sp_scrl(106,173+(pc_g shl 1),128,&H147,3) /* "SP":"G" level
endfunc
func PC_B_P()
TSP(148,124,pc_b)
sp_scrl(107,173+(pc_b shl 1),136,&H147,3) /* "SP":"B" level
endfunc
/*[E]= -: Pen Color Change :- ====
/*====------------------------====
func PC_CHANGE()
wk0=(pc_g shl 11)+(pc_r shl 6)+(pc_b shl 1)
palet( 24+(pen_c shl 1),wk0)
palet( 25+(pen_c shl 1),wk0)
edit_palet(pen_c)=wk0
sp_col2( 7,edit_palet(pen_c), 1)
endfunc
/*[E]= -: Edit Palet Defalt :- ====
/*====-------------------------====
func EDIT_PAL_DEF()
play_se(3)
for i=0 to 7
palet( 24+(i shl 1),edit_palet_def(i))
palet( 25+(i shl 1),edit_palet_def(i))
edit_palet(i)=edit_palet_def(i)
next
PEN_C_SEL()
endfunc
/*[E]= -: Hint Check :- ====
/*====------------------====
func HINT_CHECK()
for i=0 to 329
hint_x(i)=&HFF
hint_y(i)=&HFF
next
/*---- -: タテ ノ ヒント ノ チェック :- ----
tfill( 73, 3,252, 68, 0)
tfill(228,196,251,203, 0)
h_err=0
hwk0=0 /* check line
while hwk0<>xsize
if g_mode = 1 then { /* "edit" x-line cursole put
sp_scrl(117,hwk0*6+ 84, 79,&H142,3) /* "SP":cs(y)
sp_out()
}
for i=0 to 10 /* buffer clear
hint_buff(i)=&HFF
next
h_head=0
hwk1=ysize-1
h_bit(0)=edit_map(hwk0+hwk1*30) and 1
if h_bit(0) = 1 then hwk2=1 else hwk2=0 /* hwk2 = レンゾクカイスウ
hwk1=hwk1-1
while 1
h_bit(1)=edit_map(hwk0+hwk1*30) and 1
if h_bit(1) = 0 then {
if h_bit(0) = 1 then {
hint_buff(h_head)=hwk2
h_head=h_head+1
}
hwk1=hwk1-1
} else {
if h_bit(0) <> h_bit(1) then {
if h_head = 11 then {
h_err=1
break
}
hwk2=1
hwk1=hwk1-1
} else {
hwk2=hwk2+1
hwk1=hwk1-1
}
}
h_bit(0)=h_bit(1)
if hwk1 = &HFF then {
if h_bit(1) = 1 then hint_buff(h_head)=hwk2
break
}
endwhile
if h_err = 0 then {
HINT_P1(hwk0)
if g_mode = 0 then { /* "play" hint_buff save
for i=0 to 10
hint_y(hwk0*11+i)=hint_buff(i)
next
}
} else {
break
}
hwk0=hwk0+1
endwhile
if g_mode = 1 then { /* "edit" OK/ER put
if h_err = 1 then {
play_se(6)
TFP(220,196,"Xc")
return()
} else {
TFP(220,196,"Xb")
sp_scrl(117,0,0,0,0)
sp_out()
}
}
/*---- -: ヨコ ノ ヒント ノ チェック :- ----
tfill( 3, 73, 68,252, 0)
hwk0=0 /* シラベル ライン
while hwk0<>ysize
if g_mode = 1 then { /* "edit" y-line cursole put
sp_scrl(118, 79,hwk0*6+ 84,&H143,3) /* "SP":cs(x)
sp_out()
}
for i=0 to 10 /* buffer clear
hint_buff(i)=&HFF
next
h_head=0
hwk1=xsize-1
h_bit(0)=edit_map(hwk0*30+hwk1) and 1
if h_bit(0) = 1 then hwk2=1 else hwk2=0 /* hwk2 = レンゾクカイスウ
hwk1=hwk1-1
while 1
h_bit(1)=edit_map(hwk0*30+hwk1) and 1
if h_bit(1) = 0 then {
if h_bit(0) = 1 then {
hint_buff(h_head)=hwk2
h_head=h_head+1
}
hwk1=hwk1-1
} else {
if h_bit(0) <> h_bit(1) then {
if h_head = 11 then {
h_err=1
break
}
hwk2=1
hwk1=hwk1-1
} else {
hwk2=hwk2+1
hwk1=hwk1-1
}
}
h_bit(0)=h_bit(1)
if hwk1 = &HFF then {
if h_bit(1) = 1 then hint_buff(h_head)=hwk2
break
}
endwhile
if h_err = 0 then {
HINT_P2(hwk0)
if g_mode = 0 then { /* "play" hint_buff save
for i=0 to 10
hint_x(hwk0*11+i)=hint_buff(i)
next
}
} else {
break
}
hwk0=hwk0+1
endwhile
if g_mode = 1 then { /* "edit" OK/ER put
if h_err=1 then {
play_se(6)
TFP(236,196,"Yc")
return()
} else {
TFP(236,196,"Yb")
sp_scrl(118,0,0,0,0)
sp_out()
}
}
endfunc
/*[E]= -: Hint Display :- ====
/*====--------------------====
func HINT_P1(x;char)
wk0=0
while wk0 <> 11
wk1=hint_buff(wk0)
if wk1 <> &HFF then {
sp_pat(wk1,wk9,0)
tput(x*6+ 73,63-wk0*6,6,6,wk9,"pset")
wk0=wk0+1
} else {
break
}
endwhile
if wk0 = 0 then {
sp_pat(&H00,wk9,0)
tput(x*6+ 73, 63,6,6,wk9,"pset")
hint_buff(0)=&H00
}
endfunc
func HINT_P2(y;char)
wk0=0
while wk0 <> 11
wk1=hint_buff(wk0)
if wk1 <> &HFF then {
sp_pat(wk1,wk9,0)
tput(63-wk0*6,y*6+ 73,6,6,wk9,"pset")
wk0=wk0+1
} else {
break
}
endwhile
if wk0 = 0 then {
sp_pat(&H00,wk9,0)
tput( 63,y*6+ 73,6,6,wk9,"pset")
hint_buff(0)=&H00
}
endfunc
/*[E]= -: Edit Screen Fill :- ====
/*====------------------------====
func EDIT_FILL()
play_se(3)
if pen_mode = 0 then {
for i=0 to ysize-1
for j=0 to xsize-1
wk0=edit_map(i*30+j)
COL_BLK_P(flbt,(wk0 shr 1),j,i)
edit_map(i*30+j)=(wk0 and 14)+flbt
next
next
} else {
for i=0 to ysize-1
for j=0 to xsize-1
wk0=edit_map(i*30+j)
COL_BLK_P((wk0 and 1),pen_c,j,i)
edit_map(i*30+j)=(pen_c shl 1)+(wk0 and 1)
next
next
}
PRS_BT(100,236,236)
endfunc
/*[E]= -: Edit All Init. :- ====
/*====----------------------====
func EDIT_ALL_INIT(fl;char)
if fl = 1 then play_se(3)
xsize=5 /* x/y size init.
ysize=5
if fl = 1 then {
TSP(196,164,xsize)
TSP(196,172,ysize)
TSP( 48, 40,xsize)
TSP( 48, 48,ysize)
}
for i=0 to 15 /* stage title init.
stg_name(i)=&HFF
next
for i=0 to 11
wk0=stg_name(i)
TFP2(i*20+ 14,268,wk0)
next
for i=0 to 7 /* stage palet init.
edit_palet(i)=edit_palet_def(i)
palet( 24+(i shl 1),edit_palet_def(i))
palet( 25+(i shl 1),edit_palet_def(i))
next
if fl = 1 then {
PEN_C_SEL()
sp_out()
}
for i=0 to 899 /* stage data init.
edit_map(i)=&H00
next
if fl = 1 then {
apage(0)
fill( 5, 5, 34, 34, 0)
fill( 39, 5, 68, 34, 0)
EDIT_DIS()
PRS_BT(100,236,236)
}
endfunc
/*[E]= -: X Size Change :- ====
/*====---------------------====
func XSIZE_C()
if ST1 = 4 then {
for i=0 to 5
apage(1)
put(xsize*6+ 73,i*30+ 73,xsize*6+102,i*30+102,PEK)
apage(0)
fill(xsize+ 5,i*5+ 5,xsize+ 9,i*5+ 9, 0)
fill(xsize+ 39,i*5+ 5,xsize+ 43,i*5+ 9, 0)
next
/*>>>> サイズ ヲ カエタトキニ ショキカスル <<<<
/* コノシタ 5ギョウ ヲ rem ニ スルト ショキカシナクナル
for i=0 to ysize-1
for j=0 to 4
edit_map(xsize+i*30+j)=&H00
next
next
} else {
for i=0 to ysize/5-1
apage(1)
put(43+xsize*6,73+i*30,72+xsize*6,102+i*30,wkA)
apage(0)
fill(xsize ,i*5+ 5,xsize+ 4,i*5+ 9, 0)
fill(xsize+ 34,i*5+ 5,xsize+ 38,i*5+ 9, 24)
next
}
endfunc
/*[E]= -: Y Size Change :- ====
/*====---------------------====
func YSIZE_C()
if ST1 = 4 then {
for i=0 to 5
apage(1)
put(i*30+ 73,ysize*6+ 73,i*30+102,ysize*6+102,PEK)
apage(0)
fill(i*5+ 5,ysize+ 5,i*5+ 9,ysize+ 9, 0)
fill(i*5+ 39,ysize+ 5,i*5+ 43,ysize+ 9, 0)
next
/*>>>> サイズ ヲ カエタトキニ ショキカスル <<<<
/* コノシタ 5ギョウ ヲ rem ニ スルト ショキカシナクナル
for i=0 to 4
for j=0 to xsize-1
edit_map(ysize*30+i*30+j)=&H00
next
next
} else {
for i=0 to xsize/5-1
apage(1)
put(73+i*30,43+ysize*6,102+i*30,72+ysize*6,wkA)
apage(0)
fill(i*5+ 5,ysize,i*5+ 9,ysize+ 4, 0)
fill(i*5+ 39,ysize,i*5+ 43,ysize+ 4, 24)
next
}
endfunc
/*[E]= -: Stage Title Input :- ====
/*====-------------------------====
func STG_TIT_IN()
play_se(3)
TX_DISP(0) : vpage(0) : sp_disp(0)
home(0, 0,256) : home(1, 0,256)
ni_x=0
ni_y=0
n_head=0
sp_scrl(104,ni_x*12+ 26,(ni_y shl 4)+ 60,&H14C,3) /* "SP":sel font
sp_scrl(105,n_head*20+ 20, 18,&H144,3) /* "SP":input head
sp_scrl(106,n_head*20+ 20, 38,&H8144,3)
sp_scrl(107,n_head*20+ 32, 18,&H4144,3)
sp_scrl(108,n_head*20+ 32, 38,&HC144,3)
sp_scrl(117,0,0,0,0)
sp_scrl(118,0,0,0,0)
sp_out()
vpage(3) : sp_disp(1) : TX_DISP(1)
thome( 0,256)
/*---- -: Stage Title Input Main :- ----
kb_cls()
ston=&HFF
sths=&HFF
bton=kstrig(1)
while 1
ST_INP()
if kyb = &H1B then break /* ret. to title
/*---- -: カーソル ピコピコ :- ----
piko(0)=piko(0)+1 and 3
if piko(0) = 0 then {
piko(1)=piko(1)+1 and 3
}
/*++++ -: カーソル イドウ :- ++++
cxn=ni_x
cyn=ni_y
if ST1 <> 0 and sths = ST1 then {
if ston = 0 then {
ni_x=ni_x+mvof(ST1)
ni_y=ni_y+mvof(ST1+10)
if ni_x = &HFF then ni_x=19
if ni_x = 20 then ni_x=0
if ni_y = &HFF then ni_y=12
if ni_y = 13 then ni_y=0
if ni_x <> cxn or ni_y <> cyn then {
play_se(1)
}
}
}
sp_scrl(104,ni_x*12+ 30-piko(1),(ni_y shl 4)+ 64-piko(1),&H14C,3) /* "SP":オテテ
/*++++ -: "A" ボタン ガ オサレタトキ :- ++++
if bton = 0 and BT1 = 1 then {
play_se(3)
wk0=ni_y*20+ni_x
if wk0 <= 255 then {
stg_name(n_head)=fnt_l(wk0)
TFP2(n_head*20+ 14,268,fnt_l(wk0))
n_head=n_head+1
if n_head = 12 then n_head=0
}
if wk0 = 256 then { /* cursole left
n_head=n_head-1
if n_head = &HFF then n_head=11
}
if wk0 = 257 then { /* cursole right
n_head=n_head+1
if n_head = 12 then n_head=0
}
if wk0 = 258 then { /* back space
stg_name(n_head)=255
TFP2(n_head*20+ 14,268,255)
n_head=n_head-1
if n_head = &HFF then n_head=11
}
if wk0 = 259 then { /* input exit
break
}
sp_scrl(105,n_head*20+ 20, 18,&H144,3) /* "SP":input head
sp_scrl(106,n_head*20+ 20, 38,&H8144,3)
sp_scrl(107,n_head*20+ 32, 18,&H4144,3)
sp_scrl(108,n_head*20+ 32, 38,&HC144,3)
bton=BT1
}
/*++++ -: "B" ボタン ガ オサレタトキ :- ++++
if bton = 0 and BT1 = 2 then {
play_se(2)
stg_name(n_head)=255
TFP2(n_head*20+ 14,268,255)
n_head=n_head-1
if n_head = &HFF then n_head=11
sp_scrl(105,n_head*20+ 20, 18,&H144,3) /* "SP":input head
sp_scrl(106,n_head*20+ 20, 38,&H8144,3)
sp_scrl(107,n_head*20+ 32, 18,&H4144,3)
sp_scrl(108,n_head*20+ 32, 38,&HC144,3)
bton=BT1
}
/*++++ -: スティック ノ ニュウリョク アトショリ :- ++++
ST_CK2(16,3)
/*++++ -: ボタン ノ ニュウリョク アトショリ :- ++++
if bton <> BT1 then bton=0
sp_out()
endwhile
TX_DISP(0) : vpage(0) : sp_disp(0)
home(0, 0, 0) : home(1, 0, 0)
sp_scrl(104,200+(pen_c shl 3),112,&H146,3) /* "SP":select color
sp_scrl(105,173+(pc_r shl 1),120,&H147,3) /* "SP":"R" level
sp_scrl(106,173+(pc_g shl 1),128,&H147,3) /* "SP":"G" level
sp_scrl(107,173+(pc_b shl 1),136,&H147,3) /* "SP":"B" level
sp_scrl(108,0,0,0,0)
sp_out()
vpage(3) : sp_disp(1) : TX_DISP(1)
endfunc
/*[E]= -: Edit Data Save :- ====
/*====----------------------====
func EDIT_SAVE(fl;char)
if fl = 1 then play_se(3)
/*-: size data save :-
user_data((stage shl 9) )=xsize
user_data((stage shl 9)+1)=ysize
/*-: stage title save :-
for i=0 to 15
user_data((stage shl 9)+ 2+i)=stg_name(i)
next
/*-: stage palet save :-
for i=0 to 7
wk0=edit_palet(i)
user_data((stage shl 9)+18+(i shl 1))=wk0 shr 8
user_data((stage shl 9)+19+(i shl 1))=wk0 and 255
next
/*-: clear flag init. :-
user_data((stage shl 9)+34)=0
/* ^ プロテクト ヲ カケルトキ ハ "2" ニ スル
/*-: try count init. :-
user_data((stage shl 9)+35)=0
/*-: record init. :-
user_data((stage shl 9)+36)=&H00
user_data((stage shl 9)+37)=&H05
user_data((stage shl 9)+38)=&H7E
user_data((stage shl 9)+39)=&H3F
/*-: stage data save :-
if fl = 1 then {
for i=0 to 449
wk0=edit_map((i shl 1) )
wk1=edit_map((i shl 1)+1)
user_data((stage shl 9)+62+i)=(wk0 shl 4)+wk1
next
} else {
for i=0 to 449
user_data((stage shl 9)+62+i)=&H00
next
}
if fl = 1 then PRS_BT(100,236,236)
endfunc
/*[E]= -: Edit Data Load :- ====
/*====----------------------====
func EDIT_LOAD()
/*---- -: check :- ----
/*-: プロテクト :-
if (user_data((stage shl 9)+ 34) and 2) = 2 then {
play_se(6)
return()
}
/*-: データ ミトウロク :-
if user_data((stage shl 9)) = 0 then {
play_se(6)
return()
}
play_se(3)
apage(0)
fill( 5, 5, 34, 34, 0) /* sample clear
fill( 39, 5, 68, 34, 0)
/*-: size data load :-
xsize=user_data((stage shl 9) )
ysize=user_data((stage shl 9)+1)
TSP(196,164,xsize)
TSP(196,172,ysize)
TSP( 48, 40,xsize)
TSP( 48, 48,ysize)
/*-: stage title load :-
for i=0 to 15
stg_name(i)=user_data((stage shl 9)+ 2+i)
next
for i=0 to 11
wk0=stg_name(i)
TFP2(i*20+ 14,268,wk0)
next
/*-: stage palet load :-
for i=0 to 7
wk0=user_data((stage shl 9)+18+(i shl 1))
wk1=user_data((stage shl 9)+19+(i shl 1))
edit_palet(i)=(wk0 shl 8)+wk1
palet( 24+(i shl 1),edit_palet(i))
palet( 25+(i shl 1),edit_palet(i))
next
PEN_C_SEL()
/*-: stage data load :-
for i=0 to 449
wk0=user_data((stage shl 9)+62+i)
edit_map((i shl 1) )=wk0 shr 4
edit_map((i shl 1)+1)=wk0 and 15
next
EDIT_DIS()
PRS_BT(100,236,236)
endfunc
/*[E]= -: User Data Save :- ====
/*====----------------------====
func DATA_SAVE()
if dskok = 0 then {
play_se(6)
return()
}
play_se(3)
wk0=fopen("PX_USR .DAT","c")
fwrite(user_data,51200,wk0)
fclose(wk0)
PRS_BT(100,236,236)
endfunc
/*[E]= -: User Data Load :- ====
/*====----------------------====
func DATA_LOAD()
wk0=filesnum("PX_USR .DAT",&H20)
if wk0 = 0 then {
play_se(6)
return()
}
play_se(3)
wk0=fopen("PX_USR .DAT","r")
fread(user_data,51200,wk0)
fclose(wk0)
PRS_BT(100,236,236)
endfunc
/*[E]= -: Edit Data Shift :- ====
/*====-----------------------====
func SHIFT()
play_se(3)
/*-: shift up :-
if shf = 0 then {
for i=0 to xsize-1
wk0=edit_map(i)
for j=1 to ysize-1
wk1=edit_map(j*30+i)
edit_map((j-1)*30+i)=wk1
next
edit_map((ysize-1)*30+i)=wk0
next
}
/*-: shift down :-
if shf = 1 then {
for i=0 to xsize-1
wk0=edit_map(i)
for j=1 to ysize-1
wk1=edit_map(j*30+i)
edit_map(j*30+i)=wk0
wk0=wk1
next
edit_map(i)=wk0
next
}
/*-: shift left :-
if shf = 2 then {
for i=0 to ysize-1
wk0=edit_map(i*30 )
for j=1 to xsize-1
wk1=edit_map(i*30+j)
edit_map(i*30+(j-1))=wk1
next
edit_map(i*30+(xsize-1))=wk0
next
}
/*-: shift right :-
if shf = 3 then {
for i=0 to ysize-1
wk0=edit_map(i*30)
for j=1 to xsize-1
wk1=edit_map(i*30+j)
edit_map(i*30+j)=wk0
wk0=wk1
next
edit_map(i*30)=wk0
next
}
EDIT_DIS()
endfunc
/*[E]= -: Edit Data Swap :- ====
/*====----------------------====
func SWAP()
play_se(3)
/*-:- swp_s0 change -:-
TSP3(176,156,swp_s0+1)
SWAP_S1(0)
if BT1 = 2 then {
TFP(176,156,"_______")
return()
}
/*-:- swp_s1 change -:-
TFP(200,156,"^")
TSP3(208,156,swp_s1+1)
SWAP_S1(1)
if BT1 = 2 then {
TFP(176,156,"_______")
return()
}
/*---- -: data swap :- ----
for i=0 to 511
wk0=user_data((swp_s0 shl 9)+i)
wk1=user_data((swp_s1 shl 9)+i)
user_data((swp_s0 shl 9)+i)=wk1
user_data((swp_s1 shl 9)+i)=wk0
next
PRS_BT(100,236,236)
TFP(176,156,"_______")
endfunc
func SWAP_S1(fl;char)
/*---- -: swap main :- ----
kb_cls()
ston=&HFF
sths=&HFF
bton=kstrig(1)
while 1
ST_INP()
/*++++ -: swp_s0 change :- ++++
wk3=swp_s0
if ST1 <> 0 and sths = ST1 then {
if ston = 0 then {
play_se(1)
if fl = 0 then {
swp_s0=swp_s0+mvof(ST1)
if swp_s0 = &HFF then swp_s0=99
if swp_s0 = 100 then swp_s0=0
TSP3(176,156,swp_s0+1)
}
if fl = 1 then {
swp_s1=swp_s1+mvof(ST1)
if swp_s1 = &HFF then swp_s1=99
if swp_s1 = 100 then swp_s1=0
TSP3(208,156,swp_s1+1)
}
}
}
/*++++ -: "A"ボタン ガ オサレタトキ :- ++++
if BT1 = 1 then {
if bton = 0 then {
play_se(3)
bton=BT1
break
}
}
/*++++ -: "B"ボタン ガ オサレタトキ :- ++++
if BT1 = 2 then {
if bton = 0 then {
play_se(2)
bton=BT1
break
}
}
/*++++ -: スティック ノ ニュウリョク アトショリ :- ++++
ST_CK2(16,2)
/*++++ -: ボタン ノ ニュウリョク アトショリ :- ++++
if bton <> BT1 then bton=0
v_disp()
endwhile
endfunc
/*[E]= -: Edit Data BIT XOR :- ====
/*====-------------------------====
func EDIT_XOR()
play_se(3)
for i=0 to ysize-1
for j=0 to xsize-1
wk0=edit_map(i*30+j) xor 1
COL_BLK_P((wk0 and 1),(wk0 shr 1),j,i)
edit_map(i*30+j)=wk0
next
next
endfunc
/*[E]= -: Edit Data Mirror :- ====
/*====------------------------====
func MIRROR()
dim char lp(6)={0,1,4,6,9,11,14}
play_se(3)
if mir = 0 then {
/*---- -: ジョウゲ ハンテン :- ----
for i=0 to lp(ysize/5)
for j=0 to xsize-1
wk0=edit_map(i*30+j)
wk1=edit_map((ysize*30-30)-i*30+j)
edit_map(i*30+j)=wk1
edit_map((ysize*30-30)-i*30+j)=wk0
next
next
} else {
/*---- -: サユウ ハンテン :- ----
for i=0 to lp(xsize/5)
for j=0 to ysize-1
wk0=edit_map(j*30+i)
wk1=edit_map(j*30-i+xsize-1)
edit_map(j*30+i)=wk1
edit_map(j*30-i+xsize-1)=wk0
next
next
}
for i=0 to ysize-1
for j=0 to xsize-1
wk0=edit_map(i*30+j) and 1 /* bit
wk1=edit_map(i*30+j) shr 1 /* color
COL_BLK_P(wk0,wk1,j,i)
next
next
endfunc
/*[S]= -: Edit Data Display :- ====
/*====-------------------------====
func EDIT_DIS()
apage(1)
for i=0 to 5
for j=0 to 5
put(j*30+ 73,i*30+ 73,j*30+102,i*30+102,PEK)
next
next
if g_mode <> 1 then {
for i=0 to ysize-1
for j=0 to xsize-1
put(j*6+ 73,i*6+ 73,j*6+ 78,i*6+ 78,BLK0)
next
next
} else {
for i=0 to ysize-1
for j=0 to xsize-1
wk0=edit_map(i*30+j) and 1 /* bit
wk1=edit_map(i*30+j) shr 1 /* color
COL_BLK_P(wk0,wk1,j,i)
next
next
}
endfunc
/*[G]= -: Normal Block Put :- ====
/*====------------------------====
func NML_BLK_P(fl;char)
if BT1 = 1 then {
wk0=flg_map(cy*30+cx)
if wk0 <> 1 then { /* マエノジョウタイガ ケズレテイナイトキ
if flg_on_mode = 0 or flg_on_mode = 1 then {
/*---- -: hanmer anime 1st. :- ----
if fl+k8stick(1) = 0 then {
sp_scrl(100,cx_+102,cy_+ 74,&H152,3) /* "SP":hanmer
sp_scrl(101,cx_+ 90,cy_+ 78,&H150,3) /* "SP":pick'
sp_out()
sp_scrl(100,cx_+ 94,cy_+ 74,&H153,3) /* "SP":hanmer
sp_scrl(101,cx_+ 89,cy_+ 79,&H150,3) /* "SP":pick'
sp_out()
sp_scrl(100,cx_+ 94,cy_+ 74,&H153,3) /* "SP":hanmer
sp_scrl(101,cx_+ 88,cy_+ 80,&H150,3) /* "SP":pick'
sp_out()
}
play_se(4)
sp_scrl(100,cx_+ 94,cy_+ 74,&H153,3) /* "SP":hanmer
sp_scrl(101,cx_+ 87,cy_+ 81,&H150,3) /* "SP":pick'
sp_scrl(104,cx_+ 82,cy_+ 82,&H355,3) /* "SP":spark
sp_scrl(105,cx_+ 86,cy_+ 86,&HC355,3)
sp_scrl(98,0,0,0,0)
sp_scrl(99,0,0,0,0)
sp_out()
apage(1)
put(cx_+ 73,cy_+ 73,cx_+ 78,cy_+ 78,BLK2)
pset(cx+ 9,cy+ 9, 12)
flg_map(cy*30+cx)=1
flg_on_mode=1
if fl = 0 then tim_c=tim_c+4
if (edit_map(cy*30+cx) and 1) = 0 then {
if pnlt = 1 then {
play_se(6)
if tim_c >=&H537F0 then {
g_mode=99 /* ゲーム オーバー
tim_c=&H57E3F
} else {
if dbg <> 1 then tim_c=tim_c+&H4650 /* マチガエタラ 5フン プラス
}
TIM_P1()
put(cx_+ 73,cy_+ 73,cx_+ 78,cy_+ 78,BLK1)
pset(cx+ 9,cy+ 9, 4)
flg_map(cy*30+cx)=2
} else {
stg_cmp=stg_cmp-1
if help_p < 100 and fl = 0 then {
help_p=help_p+1
if (help_p and 1) = 0 then HELP_DIS()
}
}
} else {
stg_cmp=stg_cmp+1
if help_p < 100 and fl = 0 then {
help_p=help_p+1
if (help_p and 1) = 0 then HELP_DIS()
}
}
/*---- -: hanmer anime 2nd. :- ----
sp_scrl(100,cx_+102,cy_+ 74,&H152,3) /* "SP":hanmer
sp_scrl(101,cx_+ 88,cy_+ 80,&H150,3) /* "SP":pick'
sp_scrl(104,cx_+ 82,cy_+ 82,&H354,3) /* "SP":spark
sp_scrl(105,cx_+ 86,cy_+ 86,&HC354,3)
sp_out()
} else {
sp_scrl(101,cx_+ 88,cy_+ 88,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 90,cy_+ 90,&H14C,3) /* "SP":オテテ
tim_c=tim_c+1
}
} else { /* マエノジョウタイガ ケズレテイタトキ
if flg_on_mode = 0 or flg_on_mode = 2 then {
if k8stick(1) <> 0 then {
sp_scrl(101,cx_+ 86,cy_+ 90,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 88,cy_+ 92,&H14C,3) /* "SP":オテテ
sp_scrl(104,cx_+ 76,cy_+ 88,&H14D,3) /* "SP":ケムリ
sp_scrl(105,cx_+ 88,cy_+ 76,&H414D,3)
sp_out()
} else {
sp_scrl(101,cx_+ 90,cy_+ 86,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 92,cy_+ 88,&H14C,3) /* "SP":オテテ
sp_scrl(104,cx_+ 76,cy_+ 88,&H14D,3) /* "SP":ケムリ
sp_scrl(105,cx_+ 88,cy_+ 76,&H414D,3)
sp_out()
sp_scrl(101,cx_+ 86,cy_+ 90,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 88,cy_+ 92,&H14C,3) /* "SP":オテテ
sp_scrl(104,cx_+ 75,cy_+ 88,&H14D,3) /* "SP":ケムリ
sp_scrl(105,cx_+ 88,cy_+ 75,&H414D,3)
sp_out()
}
play_se(8)
apage(1)
put(cx_+ 73,cy_+ 73,cx_+ 78,cy_+ 78,BLK0)
pset(cx+ 9,cy+ 9, 4)
flg_map(cy*30+cx)=0
flg_on_mode=2
tim_c=tim_c+4
if (edit_map(cy*30+cx) and 1) = 0 then {
stg_cmp=stg_cmp+1
} else {
stg_cmp=stg_cmp-1
}
if k8stick(1) = 0 then {
sp_scrl(101,cx_+ 89,cy_+ 87,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 91,cy_+ 89,&H14C,3) /* "SP":オテテ
sp_scrl(104,cx_+ 74,cy_+ 88,&H14E,3) /* "SP":ケムリ
sp_scrl(105,cx_+ 88,cy_+ 74,&H414E,3)
sp_out()
sp_scrl(101,cx_+ 87,cy_+ 89,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 89,cy_+ 91,&H14C,3) /* "SP":オテテ
sp_scrl(104,cx_+ 73,cy_+ 88,&H14E,3) /* "SP":ケムリ
sp_scrl(105,cx_+ 88,cy_+ 73,&H414E,3)
sp_out()
}
sp_scrl(101,cx_+ 88,cy_+ 88,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 90,cy_+ 90,&H14C,3) /* "SP":オテテ
sp_scrl(104,cx_+ 72,cy_+ 88,&H14D,3) /* "SP":ケムリ
sp_scrl(105,cx_+ 88,cy_+ 72,&H414D,3)
sp_out()
} else {
sp_scrl(100,cx_+102,cy_+ 74,&H152,3) /* "SP":hanmer
tim_c=tim_c+1
}
}
}
if BT1 = 2 then {
wk0=flg_map(cy*30+cx)
if wk0 <> 2 then { /* マエノジョウタイガ チェック サレテイナイトキ
if flg_on_mode = 0 or flg_on_mode = 1 then {
if k8stick(1) <> 0 then {
sp_scrl(101,cx_+ 86,cy_+ 82,&H150,3) /* "SP":pick'
sp_out()
} else {
sp_scrl(101,cx_+ 89,cy_+ 79,&H150,3) /* "SP":pick'
sp_out()
sp_scrl(101,cx_+ 86,cy_+ 82,&H150,3) /* "SP":pick'
sp_out()
}
play_se(5)
apage(1)
put(cx_+ 73,cy_+ 73,cx_+ 78,cy_+ 78,BLK1)
pset(cx+ 9,cy+ 9, 6)
if flg_map(cy*30+cx) = 1 then {
if (edit_map(cy*30+cx) and 1) = 0 then {
stg_cmp=stg_cmp+1
} else {
stg_cmp=stg_cmp-1
}
}
flg_map(cy*30+cx)=2
flg_on_mode=1
tim_c=tim_c+4
if k8stick(1) = 0 then {
sp_scrl(101,cx_+ 86,cy_+ 79,&H150,3) /* "SP":pick'
sp_out()
sp_scrl(101,cx_+ 89,cy_+ 82,&H150,3) /* "SP":pick'
sp_out()
}
sp_scrl(101,cx_+ 88,cy_+ 80,&H150,3) /* "SP":pick'
} else {
sp_scrl(101,cx_+ 88,cy_+ 88,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 90,cy_+ 90,&H14C,3) /* "SP":オテテ
tim_c=tim_c+1
}
} else { /* マエノジョウタイガ チェック サレテイタトキ
if flg_on_mode = 0 or flg_on_mode = 2 then {
if k8stick(1) <> 0 then {
sp_scrl(101,cx_+ 86,cy_+ 90,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 88,cy_+ 92,&H14C,3) /* "SP":オテテ
sp_scrl(104,cx_+ 76,cy_+ 88,&H14D,3) /* "SP":ケムリ
sp_scrl(105,cx_+ 88,cy_+ 76,&H414D,3)
sp_out()
} else {
sp_scrl(101,cx_+ 90,cy_+ 86,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 92,cy_+ 88,&H14C,3) /* "SP":オテテ
sp_scrl(104,cx_+ 76,cy_+ 88,&H14D,3) /* "SP":ケムリ
sp_scrl(105,cx_+ 88,cy_+ 76,&H414D,3)
sp_out()
sp_scrl(101,cx_+ 86,cy_+ 90,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 88,cy_+ 92,&H14C,3) /* "SP":オテテ
sp_scrl(104,cx_+ 75,cy_+ 88,&H14D,3) /* "SP":ケムリ
sp_scrl(105,cx_+ 88,cy_+ 75,&H414D,3)
sp_out()
}
play_se(8)
apage(1)
put(cx_+ 73,cy_+ 73,cx_+ 78,cy_+ 78,BLK0)
pset(cx+ 9,cy+ 9, 4)
flg_map(cy*30+cx)=0
flg_on_mode=2
tim_c=tim_c+4
if k8stick(1) = 0 then {
sp_scrl(101,cx_+ 89,cy_+ 87,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 91,cy_+ 89,&H14C,3) /* "SP":オテテ
sp_scrl(104,cx_+ 74,cy_+ 88,&H14E,3) /* "SP":ケムリ
sp_scrl(105,cx_+ 88,cy_+ 74,&H414E,3)
sp_out()
sp_scrl(101,cx_+ 87,cy_+ 89,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 89,cy_+ 91,&H14C,3) /* "SP":オテテ
sp_scrl(104,cx_+ 73,cy_+ 88,&H14E,3) /* "SP":ケムリ
sp_scrl(105,cx_+ 88,cy_+ 73,&H414E,3)
sp_out()
}
sp_scrl(101,cx_+ 88,cy_+ 88,&H156,3) /* "SP":コクバンケシ
sp_scrl(100,cx_+ 90,cy_+ 90,&H14C,3) /* "SP":オテテ
sp_scrl(104,cx_+ 72,cy_+ 88,&H14D,3) /* "SP":ケムリ
sp_scrl(105,cx_+ 88,cy_+ 72,&H414D,3)
sp_out()
} else {
tim_c=tim_c+1
}
}
}
if dbg = 1 then {
TSP3( 8, 64,stg_cmp)
TSP3( 40, 64,help_p)
}
endfunc
/*[E]= -: Color Block(bit mode) :- ====
/*====-----------------------------====
func CLBK_BIT()
if BT1 = 1 then {
wk0=edit_map(cy*30+cx)
if (wk0 and 1) = 0 then { /* マエノジョウタイガ ビットオフ ノ トキ
if flg_on_mode = 0 or flg_on_mode = 1 then {
play_se(4)
COL_BLK_P(1,(wk0 shr 1),cx,cy)
edit_map(cy*30+cx)=wk0 xor 1
flg_on_mode=1
}
} else { /* マエノジョウタイガ ビットオン ノ トキ
if flg_on_mode = 0 or flg_on_mode = 2 then {
play_se(8)
COL_BLK_P(0,(wk0 shr 1),cx,cy)
edit_map(cy*30+cx)=wk0 xor 1
flg_on_mode=2
}
}
}
if BT1 = 2 then {
wk0=edit_map(cy*30+cx)
if (wk0 and 1) = 1 then { /* マエノジョウタイガ ビットオン ノ トキ
if flg_on_mode = 0 or flg_on_mode = 1 then {
play_se(8)
COL_BLK_P(0,(wk0 shr 1),cx,cy)
edit_map(cy*30+cx)=wk0 xor 1
flg_on_mode=1
}
}
}
endfunc
/*[E]= -: Color Block(pic mode) :- ====
/*====-----------------------------====
func CLBK_PIC()
if BT1 = 1 then {
wk0=edit_map(cy*30+cx)
COL_BLK_P((wk0 and 1),pen_c,cx,cy)
edit_map(cy*30+cx)=(pen_c shl 1)+(wk0 and 1)
}
if BT1 = 2 then {
wk0=edit_map(cy*30+cx)
pen_c=wk0 shr 1
fill( 24, 56, 30, 62, 24+(pen_c shl 1)) /* para, win
sp_col2( 7,edit_palet(pen_c),1)
}
endfunc
/*[E]= -: Color Block Put :- ====
/*====-----------------------====
func COL_BLK_P(bit;char,col;char,x;char,y;char)
apage(1)
if bit=0 then {
if col=0 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CB0)
if col=1 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CB1)
if col=2 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CB2)
if col=3 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CB3)
if col=4 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CB4)
if col=5 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CB5)
if col=6 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CB6)
if col=7 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CB7)
} else {
if col=0 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CBS0)
if col=1 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CBS1)
if col=2 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CBS2)
if col=3 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CBS3)
if col=4 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CBS4)
if col=5 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CBS5)
if col=6 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CBS6)
if col=7 then put( 73+x*6, 73+y*6, 78+x*6, 78+y*6,CBS7)
}
apage(0)
pset(x+ 5,y+ 5,(bit shl 4))
pset(x+ 39,y+ 5, 24+(col shl 1))
endfunc
/*[S]= -: 5マスオキ ノ ケイセン :- ====
/*====--------------------====
func KEISEN()
wk0=xsize/5
wk1=ysize/5
/*---- -: タテ ノ ケイセン :- ----
if wk0 >= 2 then {
for i=1 to wk0-1
tline(i*30+ 72, 72,i*30+ 72,wk1*30+ 72, 3)
next
}
/*---- -: ヨコ ノ ケイセン :- ----
if wk1 >= 2 then {
for i=1 to wk1-1
tline( 72,i*30+ 72,wk0*30+ 72,i*30+ 72, 3)
next
}
endfunc
/*[S]= -: Press Button :- ====
/*====--------------------====
func PRS_BT(pn;char,x;char,y;char)
bton=kstrig(1)
while 1
BT1=kstrig(1)
/*---- -: push anime :- ----
piko(0)=piko(0)+1 and 15
if piko(0) = 0 then {
piko(1)=piko(1)+1 and 1
sp_scrl(pn ,x+16,y+ 4+(piko(1) shl 1),&H16F,3)
sp_scrl(pn+1,x+16,y+16,&H16D+piko(1),3)
}
/*++++ -: ボタン ガ オサレタトキ :- ++++
if BT1 <> 0 and bton = 0 then {
play_se(3)
break
}
if bton <> BT1 then bton=0
sp_out()
endwhile
sp_scrl(pn ,0,0,0,0)
sp_scrl(pn+1,0,0,0,0)
sp_out()
endfunc
/*[S]= -: Text Screen On/Off :- ====
/*====--------------------------====
func TX_DISP(fl;char)
v_disp()
thome(256-(fl shl 8), 0)
endfunc
/*[S]= -: Screen All Off :- ====
/*====----------------------====
func SCR_ALL_OFF()
TX_DISP(0)
vpage(0)
sp_disp(0)
apage(0)
fill( 0, 0,255,255, 0)
tfill( 0, 0,255,255, 0)
for i=0 to 127
sp_scrl(i,0,0,0,0)
next
sp_out()
endfunc
/*[G]= -: Back Palet Set :- ====
/*====----------------------====
func BK_PAL_SET()
if stg_p = 0 then {
PL_S( 1,rgb(25,24,18)) /* block pal.
PL_S( 2,rgb(23,21,16))
PL_S( 3,rgb(21,19,14))
PL_S( 4,rgb(19,17,12))
PL_S( 5,rgb(17,15,10))
PL_S( 6,rgb(15,13, 8))
wk0=rgb(12,22,12)
}
if stg_p = 1 then {
PL_S( 1,rgb(25,25,23))
PL_S( 2,rgb(23,23,21))
PL_S( 3,rgb(20,20,19))
PL_S( 4,rgb(17,17,17))
PL_S( 5,rgb(14,14,15))
PL_S( 6,rgb(11,11,13))
wk0=rgb(11,18,23)
}
if stg_p = 2 then {
PL_S( 1,rgb(25,24,23))
PL_S( 2,rgb(23,22,21))
PL_S( 3,rgb(20,19,18))
PL_S( 4,rgb(17,16,15))
PL_S( 5,rgb(14,13,12))
PL_S( 6,rgb(11,10, 9))
wk0=rgb(12,22,19)
}
if stg_p = 3 then {
PL_S( 1,rgb(25,25,20))
PL_S( 2,rgb(22,22,17))
PL_S( 3,rgb(19,19,14))
PL_S( 4,rgb(16,16,11))
PL_S( 5,rgb(13,13, 8))
PL_S( 6,rgb(10,10, 5))
wk0=rgb(18,13,23)
}
PL_S( 9,wk0) /* line cursole
sp_col2( 3,wk0, 0)
PAL(6)=wk0 shr 8
PAL(7)=wk0 and &HFF
sp_out()
stg_p=stg_p+1 and 3
endfunc
/*[I]= -: Screen Make :- ====
/*====-------------------====
func SCR_MK1()
/*---- -: main screen :- ----
apage(1) /* active"1" make.
fill( 0, 0,255,255, 4) /* back
line( 1, 1, 1,253, 12)
line( 1, 1,253, 1, 12)
/* line(254, 2,254,254, 2)
/* line( 2,254,254,254, 2)
for i=0 to 14 /* ヒント ヒョウジラン
fill(i*12+ 73, 3,i*12+ 78, 68, 6)
fill(i*12+ 79, 3,i*12+ 84, 68, 4)
fill( 3,i*12+ 73, 68,i*12+ 78, 6)
fill( 3,i*12+ 79, 68,i*12+ 84, 4)
next
/* for i=0 to 511 /* ヨゴレ ヲ イレル
/* wk0=rand() and &HFF
/* wk1=rand() and &HFF
/* wk2=point(wk0,wk1)
/* if wk2 = 12 then wk2=10
/* pset(wk0,wk1,wk2+2)
/* next
for i=0 to 2 /* ヒント 5マスオキ ケイセン
wk0=102+i*60
line(wk0 , 3,wk0 , 68, 8,&H5555)
line(wk0+30, 3,wk0+30, 68, 6,&H5555)
line( 3,wk0 , 68,wk0 , 8,&H5555)
line( 3,wk0+30, 68,wk0+30, 6,&H5555)
next
/* KEISEN() /* 5マスオキ ノ ケイセン
for i=0 to 29 /* カーソルイチ ランプ
wk0=73+i*6
put(wk0, 69,wk0+5, 72,MK0)
put( 69,wk0, 72,wk0+5,MK1)
next
pset( 72, 72, 16)
/*---- -: title :- ----
apage(1) /* active "1" make.
sp_pat(&H3F,wkA,1) : put(496,240,511,255,wkA)
for i=0 to 15
wk0=(i shl 4)
for j=0 to 15
wk1=256+(j shl 4)
wk2=point(496+j,240+i)
if wk2 = 0 then put(wk1,wk0,wk1+15,wk0+15,TBK0)
if wk2 = 1 then put(wk1,wk0,wk1+15,wk0+15,TBK0_)
if wk2 = 2 then put(wk1,wk0,wk1+15,wk0+15,TBK1)
if wk2 = 3 then put(wk1,wk0,wk1+15,wk0+15,TBK1_)
if wk2 = 4 then put(wk1,wk0,wk1+15,wk0+15,TBK2)
if wk2 = 5 then put(wk1,wk0,wk1+15,wk0+15,TBK2_)
if wk2 = 6 then put(wk1,wk0,wk1+15,wk0+15,TBK3)
if wk2 = 7 then put(wk1,wk0,wk1+15,wk0+15,TBK3_)
if wk2 = 8 then put(wk1,wk0,wk1+15,wk0+15,TBK3__)
if wk2 = 9 then put(wk1,wk0,wk1+15,wk0+15,TBK4)
if wk2 =10 then put(wk1,wk0,wk1+15,wk0+15,TBK4_)
if wk2 =11 then put(wk1,wk0,wk1+15,wk0+15,TBK4__)
next
next
for i=0 to 17
line(455+i, 0,511, 56-i,rb_p(i))
line(256,199+i,312-i,255,rb_p(i))
next
/*---- -: problem select :- ----
apage(0) /* active "0" make.
line(264, 11,503, 11,164) /* logo line
line(265, 12,502, 12,164)
line(268, 15,507, 15,177)
line(269, 16,506, 16,177)
fill(272, 24,343, 95,177) /* カンセイズ
/* box(275, 27,340, 92, 0)
for i=0 to 15 /* サンカク ヤジルシ
line(288-i, 96+i,288+i, 96+i,177)
line(284-i, 92+i,284+i, 92+i,164)
next
fill(392, 39,507, 60,177) /* モンダイ ノ ダイメイ
for i=0 to 6
put(392+(i shl 4), 40,407+(i shl 4), 55,BK0)
next
fill(348,100,507,255,177) /* モンダイ ノ クリア ジョウキョウ
for i=0 to 9
wk0=96+(i shl 4)
for j=0 to 9
wk1=344+(j shl 4)
put(wk1,wk0,wk1+15,wk0+15,PROB0)
next
next
/*---- -: font list :- ----
apage(0) /* active "0" make.
for i=0 to 11 /* input title ワク
wk0=i*20+10
fill(wk0+2,266,wk0+17,289,177)
put(wk0,264,wk0+15,279,BK0)
put(wk0,280,wk0+15,295,BK0)
next
fill( 0,288,255,295, 0) /* list up
for i=0 to 13
wk0=288+(i shl 4)
for j=0 to 15
wk1=(j shl 4)
put(wk1,wk0,wk1+15,wk0+15,BK0)
next
next
fill( 0,256, 3,511, 0)
fill(252,256,255,511, 0)
fill( 0,504,255,511, 0)
fill(252,290,253,505,177)
fill( 6,504,253,505,177)
for i=0 to 11 /* input title ワク(text)
wk0=i*20+10
tfill(wk0 ,264,wk0+15,287, 8)
tfill(wk0+1,265,wk0+14,286,15)
tfill(wk0+2,266,wk0+13,285, 8)
tfill(wk0+3,267,wk0+12,284, 0)
next
tfill( 4,288,251,503, 8) /* list up ワク(text)
tfill( 5,289,250,502,15)
tfill( 6,290,249,501, 8)
tfill( 7,291,248,500, 0)
for i=0 to 12 /* font list up
for j=0 to 19
TFP2( 10+j*12,292+(i shl 4),fnt_l(i*20+j))
next
next
TFP2(202,484,&H110) /* <-,->,bs,end
TFP2(214,484,&H111)
TFP2(226,484,&H112)
TFP2(238,484,&H113)
TFP( 8,256,"TITLE_INPUT")
TFP( 4,504,"SELECT\JOY[STICK_INPUT\A[BUTTON")
/*---- -: complete :- ----
apage(1) /* active "1" make.
for i=0 to 7 /* back 4(レンガ)
wk0=(i shl 5)+256
for j=0 to 7
wk1=(j shl 5)+256
put(wk1,wk0,wk1+31,wk0+31,BK4)
next
next
for i=0 to 11 /* グラデーション
fill(320,272+(i shl 4),495,279+(i shl 4), 0)
fill(312,280+(i shl 4),503,287+(i shl 4), 0)
next
for i=0 to 21
put(320+(i shl 3),400,327+(i shl 3),463,DSP_BK)
next
for i=0 to 3
wk0=408+(i shl 4)
get(320,wk0,327,wk0+7,wk9)
put(312,wk0,319,wk0+7,wk9)
put(496,wk0,503,wk0+7,wk9)
next
fill(336,480,479,487, 84) /* stage title
fill(344,488,471,495, 84)
fill(336,496,479,503, 84)
for i=0 to 17
line(256,447+i,320-i,511,rb_p(i))
next
/*---- -: rule display :- ----
apage(0)
RULE_S1(260, 5, 0)
RULE_S1(280,15, 6)
RULE_S1(296, 9, 22)
RULE_S1(316,15, 32)
RULE_S1(332,15, 48)
RULE_S1(352,15, 64)
RULE_S1(368,11, 80)
RULE_S1(388,15, 92)
RULE_S1(404,15,108)
RULE_S1(420,15,124)
RULE_S1(436, 6,140)
RULE_S1(456,15,147)
RULE_S1(472,15,163)
RULE_S1(492,15,179)
endfunc
/*[S]= -: key borad buffer clear :- ====
/*====------------------------------====
func kb_cls()
while 1
if inkey$(0) = "" then break
endwhile
endfunc
/*[S]= -: Key Board & Stick & Mouse Input Check :- ====
/*====---------------------------------------------====
func ST_INP()
ST1=k8stick(1)
BT1=kstrig(1)
kyb=asc(inkey$(0))
endfunc
/*[S]= -: スティック ノ ニュウリョク アトショリ :- ====
/*====----------------------------====
func ST_CK2(fl0;char,fl1;char)
if sths <> ST1 then {
ston=0
stot=0
sttmf=0
} else {
ston=1
}
if ston <> 0 and sths = ST1 then {
stot=stot+1
if sttmf = 0 then {
if stot = fl0 then {
ston=0
stot=0
sttmf=1
}
} else {
if stot = fl1 then {
ston=0
stot=0
}
}
}
sths=ST1
endfunc
/*[S]= -: Text Font Put :- ====
func TFP(x;int,y;int,m;str)
for i=0 to len(m)-1
wk0=asc(mid$(m,i+1,1))+&H10
sp_pat(wk0,wk9,0)
tput(x,y,8,8,wk9,"pset")
x=x+8
next
endfunc
/*[S]= -: Text スウジ Put :- ====
func TSP(x;int,y;int,n;char)
if n <= 9 then {
sp_pat(&H40,wk9,0)
tput(x ,y,8,8,wk9,"pset")
sp_pat(&H40+n,wk9,0)
tput(x+8,y,8,8,wk9,"pset")
} else {
if n >= 100 then n=99
wk0=atoi(mid$(itoa(n),1,1))
sp_pat(&H40+wk0,wk9,0)
tput(x ,y,8,8,wk9,"pset")
wk0=atoi(mid$(itoa(n),2,1))
sp_pat(&H40+wk0,wk9,0)
tput(x+8,y,8,8,wk9,"pset")
}
endfunc
func TSP3(x;int,y;int,n;int)
if n <= 9 then {
sp_pat(&H40,wk9,0)
tput(x ,y,8,8,wk9,"pset")
tput(x+ 8,y,8,8,wk9,"pset")
sp_pat(&H40+n,wk9,0)
tput(x+16,y,8,8,wk9,"pset")
}
if n >= 10 and n <= 99 then {
sp_pat(&H40,wk9,0)
tput(x ,y,8,8,wk9,"pset")
wk0=atoi(mid$(itoa(n),1,1))
sp_pat(&H40+wk0,wk9,0)
tput(x+ 8,y,8,8,wk9,"pset")
wk0=atoi(mid$(itoa(n),2,1))
sp_pat(&H40+wk0,wk9,0)
tput(x+16,y,8,8,wk9,"pset")
}
if n >= 100 then {
if n >= 1000 then n=999
wk0=atoi(mid$(itoa(n),1,1))
sp_pat(&H40+wk0,wk9,0)
tput(x ,y,8,8,wk9,"pset")
wk0=atoi(mid$(itoa(n),2,1))
sp_pat(&H40+wk0,wk9,0)
tput(x+ 8,y,8,8,wk9,"pset")
wk0=atoi(mid$(itoa(n),3,1))
sp_pat(&H40+wk0,wk9,0)
tput(x+16,y,8,8,wk9,"pset")
}
endfunc
/*[S]= -: Text Font Put(8x16) :- ====
func TFP2(x;int,y;int,cd;int)
wk0=cd shr 1
wk1=cd and 1
sp_pcg(&H3F,PCG1,&H98+wk0) /* フォント パターン ヨウイ
sp_out()
sp_pat(&HFC+(wk1 shl 1),wk9,0) /* フォント プット
tput(x,y,8,8,wk9,"pset")
sp_pat(&HFD+(wk1 shl 1),wk9,0)
tput(x,y+8,8,8,wk9,"pset")
endfunc
/*[S]= -: Sprite スウジ Put :- ====
func SSP2(pn;char,x;int,y;int,n;int,p_c;int,on;char)
if n <= 9 then {
sp_scrl(pn ,x ,y,p_c,on)
sp_scrl(pn+1,x+8,y,p_c+n,3)
}
if n >= 10 then {
if n >= 100 then n=99
wk0=atoi(mid$(itoa(n),1,1))
sp_scrl(pn ,x ,y,p_c+wk0,3)
wk0=atoi(mid$(itoa(n),2,1))
sp_scrl(pn+1,x+8,y,p_c+wk0,3)
}
endfunc
func SSP3(pn;char,x;int,y;int,n;int,p_c;int,on;char)
if n <= 9 then {
sp_scrl(pn ,x ,y,p_c,on)
sp_scrl(pn+1,x+ 8,y,p_c,on)
sp_scrl(pn+2,x+16,y,p_c+n,3)
}
if n >= 10 and n <= 99 then {
sp_scrl(pn ,x ,y,p_c,on)
wk0=atoi(mid$(itoa(n),1,1))
sp_scrl(pn+1,x+ 8,y,p_c+wk0,3)
wk0=atoi(mid$(itoa(n),2,1))
sp_scrl(pn+2,x+16,y,p_c+wk0,3)
}
if n >= 100 then {
if n >= 1000 then n=999
wk0=atoi(mid$(itoa(n),1,1))
sp_scrl(pn ,x ,y,p_c+wk0,3)
wk0=atoi(mid$(itoa(n),2,1))
sp_scrl(pn+1,x+ 8,y,p_c+wk0,3)
wk0=atoi(mid$(itoa(n),3,1))
sp_scrl(pn+2,x+16,y,p_c+wk0,3)
}
endfunc
/*[S]= -: Time Counter Display :- ====
/*====----------------------------====
func TIM_P1()
tim_w=tim_c / 60
if inft = 0 then {
SSP2( 88, 36, 44,tim_w / 60,&H230,0) /* min.
SSP2( 90, 60, 44,tim_w mod 60,&H230,3) /* sec.
} else {
SSP2( 88, 52, 26,tim_w / 60,&H230,0)
SSP2( 90, 54, 44,tim_w mod 60,&H230,3)
}
endfunc
/*[I]= -: Screen Initialize :- ====
/*====-------------------------====
func SCR_INIT()
screen 0,2,1,1
/* iocs(&H10,&H38):iocs(&H90)
console ,,0
contrast(0)
v_priority("STG","01") /* プライオリティ (SP>TX>GR)
v_special(3) /* ハントウメイ (ベース+セカンド)
window( 0, 0,511,511)
home(0, 0, 0)
home(1, 0, 0)
vpage(0)
apage(0)
tcls()
thome(256, 0)
tfill(256, 0,767,767, 8)
TX_DISP(0)
sp_init()
sp_disp(0)
mouse(0)
mouse(4)
m_stop()
toroku_zmd( zmd_list )
play_zmd( 0 )
endfunc
/*[I]= -: Grpahics Palet Set :- ====
/*====--------------------------====
func GPAL_SET()
PL_S( 0,0)
PL_S( 1,rgb(25,24,18)) /* block pal.
PL_S( 2,rgb(23,21,16))
PL_S( 3,rgb(21,19,14))
PL_S( 4,rgb(19,17,12))
PL_S( 5,rgb(17,15,10))
PL_S( 6,rgb(15,13, 8))
PL_S( 7,rgb(15,15,15))
PL_S( 8,rgb(12,12,12))
PL_S( 9,rgb( 0,15,25)) /* line
PL_S( 10,rgb( 0,15,25)) /* back(window)
PL_S( 11,rgb( 0,12,23))
PL_S( 12,rgb( 1, 1, 1)) /* block(color) pal.
PL_S( 13,rgb( 1,15,30))
PL_S( 14,rgb(30,10,10))
PL_S( 15,rgb(30,10,30))
PL_S( 16,rgb( 1,27, 1))
PL_S( 17,rgb( 1,29,30))
PL_S( 18,rgb(30,29, 1))
PL_S( 19,rgb(30,30,30))
PL_S( 20,rgb(18,19,14)) /* back 2
PL_S( 21,rgb(15,17,13))
PL_S( 22,rgb(12,15,12))
PL_S( 23,rgb( 9,13,11))
PL_S( 24,rgb( 6,11,10))
PL_S( 25,rgb(28,20,20)) /* title sub
PL_S( 26,rgb(28,27,20))
PL_S( 27,rgb(25,20, 0)) /* report
PL_S( 28,rgb(23,18, 0))
PL_S( 29,rgb(21,16, 0))
PL_S( 30,rgb(19,14, 0))
PL_S( 31,rgb( 0,13,10))
PL_S( 32,rgb( 0,10, 5))
PL_S( 33,rgb(19,25,24))
PL_S( 34,rgb(16,23,22))
PL_S( 35,rgb(13,21,20))
PL_S( 36,rgb(20,18,16)) /* 20,14,15 /* back 4(レンガ)
PL_S( 37,rgb(17,16,15)) /* 18,12,13
PL_S( 38,rgb(14,14,14)) /* 16,10,11
PL_S( 39,rgb(11,12,13)) /* 14, 8, 9
PL_S( 40,rgb( 8,10,12)) /* 12, 6, 7
PL_S( 41,rgb( 5, 8,11)) /* 10, 4, 5
PL_S( 42,rgb(14,13,13)) /* 13,14,15
PL_S( 43,rgb(12,10,10)) /* 12,13,14
PL_S( 44,rgb(23,24,24)) /* demo ワク(color)
PL_S( 45,rgb(21,22,22))
PL_S( 46,rgb(29,24,24))
PL_S( 47,rgb(27,22,22))
PL_S( 48,rgb(28,28,23))
PL_S( 49,rgb(26,26,21))
PL_S( 50,rgb(23,28,23))
PL_S( 51,rgb(21,26,21))
PL_S( 52,rgb(24,24,29))
PL_S( 53,rgb(22,22,27))
PL_S( 54,rgb(13,14,14))
PL_S( 55,rgb(15, 0,15)) /* complete back
PL_S( 56,rgb(13, 0,13))
PL_S( 57,rgb(11, 0,11))
PL_S( 58,rgb( 9, 0, 9))
PL_S( 59,rgb( 7, 0, 7))
PL_S( 60,rgb( 5, 0, 5))
PL_S( 61,rgb( 3, 0, 3))
PL_S( 62,rgb( 1, 0, 1))
PL_S( 63,rgb(30,30,30)) /* イチゴ
PL_S( 64,rgb(26,27,25))
PL_S( 65,rgb(30,20,20))
PL_S( 66,rgb(25,15,15))
PL_S( 67,rgb( 0,25, 0))
PL_S( 68,rgb(15,25,15))
PL_S( 69,rgb(30,26,30)) /* title
PL_S( 70,rgb(29,23,28))
PL_S( 71,rgb(28,20,26))
PL_S( 72,rgb(30,30,30))
PL_S( 73,rgb(25,26,30))
PL_S( 74,rgb(22,23,28))
PL_S( 75,rgb(19,20,26))
PL_S( 76,rgb(28,29,30))
PL_S( 77,rgb(14,15,16))
PL_S( 78,rgb(14,14,14))
PL_S( 79,rgb(31,29,30))
PL_S( 80,rgb(25,25,25))
PL_S( 81,rgb(20,21,20))
PL_S( 82,rgb(30, 0, 0)) /* problem select
PL_S( 83,rgb(26, 0, 0))
PL_S( 84,rgb(28,28,18)) /* problem title
PL_S( 85,rgb(22,22,18))
PL_S( 86,rgb(20,20,18))
PL_S( 87,rgb(18,18,18))
PL_S( 88,rgb( 1, 1, 1)) /* title shadow
PL_S( 89,rgb( 2, 2, 2))
PL_S( 90,rgb( 4, 4, 4))
PL_S( 91,rgb( 6, 6, 6))
PL_S( 92,rgb( 8, 8, 8))
PL_S( 93,rgb(10,10,10))
PL_S( 94,rgb(12,12,12))
PL_S( 95,rgb(14,14,14))
PL_S( 96,rgb(16,16,16))
PL_S( 97,rgb(18,18,18))
PL_S( 98,rgb(20,20,20))
PL_S( 99,rgb(22,22,22))
PL_S(100,rgb(24,24,24))
PL_S(101,rgb(26,26,26))
PL_S(102,rgb(28,28,28))
PL_S(103,rgb(30,30,30))
PL_S(104,rgb( 9, 0, 0)) /* problem list
PL_S(105,rgb(11, 0, 0))
PL_S(106,rgb(13, 0, 0))
PL_S(107,rgb(15, 0, 0))
PL_S(108,rgb(17, 0, 1))
PL_S(109,rgb(19, 3, 4))
PL_S(110,rgb(21, 6, 7))
PL_S(111,rgb(23, 9,10))
PL_S(112,rgb(25,12,13))
PL_S(113,rgb(20,28,26)) /* back 3
PL_S(114,rgb(30,26,28))
PL_S(115,rgb(24,26,30))
PL_S(116,rgb(24,30,26))
PL_S(117,rgb(30,30,26))
PL_S(118,rgb(16,18,24)) /* comp. 1st.
PL_S(119,rgb(14,16,22))
PL_S(120,rgb(12,14,20))
PL_S(121,rgb(10,12,18))
PL_S(122,rgb( 8,10,16))
PL_S(123,rgb( 6, 8,14))
PL_S(124,rgb( 4, 6,12))
PL_S(125,rgb( 2, 4,10))
endfunc
func PL_S(n;char,cl;int)
palet((n shl 1) ,cl)
palet((n shl 1)+1,cl)
endfunc
/*[I]= -: PCG Set :- ====
/*====---------------====
func PCG_SET()
for i=0 to 8
sp_palet(i,PAL,i)
sp_col2(0,0,i)
next
for i=0 to 151
sp_pcg(i,PCG1,i)
next
sp_out()
endfunc
/*[I]= -: Data Read :- ====
/*====-----------------====
func DATA_READ()
/*---- -: モンダイ ファイルメイ チェック :- ----
if b_argc = 2 then {
stg_fl=b_argv(b_argc-1)
} else {
stg_fl=getenv("PXFILE")
if stg_fl = "" then stg_fl=getenv("pxfile")
if stg_fl = "" then stg_fl="PX_STG0"
}
print "PROBLEM FILE = ";stg_fl;".DAT"
/*---- -: トチュ セーブデータ ガ アルカ チェック :- ----
ldok=filesnum(stg_fl+".RES",&H20)
print "Resume File = ";
if ldok <> 0 then print "
Found!
" else print "
Missing!
"
/*---- -: カキコミ デキルカ チェック :- ----
if drvctrl(7) = &HF5 or (drvctrl(0) and 4) = 1 then {
dskok=0
print "プレイデータを
更新しません。
"
} else {
dskok=1
print "プレイデータを
自動更新します。
"
}
/*---- -: カクシュ データ ヨミコミ :- ----
wk0=fopen("PX .PAL","r")
fread(PAL,288,wk0)
fclose(wk0)
wk0=fopen("PX .OBJ","r")
fread(PCG1,37120,wk0)
fclose(wk0)
wk0=fopen("PX .GRD","r")
fread(BLK0,36,wk0)
fread(BLK1,36,wk0)
fread(BLK2,36,wk0)
fread(MK0,24,wk0)
fread(MK1,24,wk0)
fread(PEK,900,wk0)
fread(CB0,36,wk0) /* bit off block (color)
fread(CB1,36,wk0)
fread(CB2,36,wk0)
fread(CB3,36,wk0)
fread(CB4,36,wk0)
fread(CB5,36,wk0)
fread(CB6,36,wk0)
fread(CB7,36,wk0)
fread(CBS0,36,wk0) /* bit on block (color)
fread(CBS1,36,wk0)
fread(CBS2,36,wk0)
fread(CBS3,36,wk0)
fread(CBS4,36,wk0)
fread(CBS5,36,wk0)
fread(CBS6,36,wk0)
fread(CBS7,36,wk0)
fread(BK0,256,wk0) /* window back
fread(BK2,256,wk0) /* ナナメ モヨウ
fread(BK2_,256,wk0)
fread(BK3,256,wk0)
fread(BK3_,256,wk0)
fread(BK4,1024,wk0) /* レンガ
fread(BK4S0,128,wk0)
fread(BK4S1,128,wk0)
fread(BK5,256,wk0) /* イチゴ
fread(BK5_,256,wk0)
fread(TBK0,256,wk0) /* title back
fread(TBK0_,256,wk0)
fread(TBK1,256,wk0)
fread(TBK1_,256,wk0)
fread(TBK2,256,wk0)
fread(TBK2_,256,wk0)
fread(TBK3,256,wk0)
fread(TBK3_,256,wk0)
fread(TBK3__,256,wk0)
fread(TBK4,256,wk0)
fread(TBK4_,256,wk0)
fread(TBK4__,256,wk0)
fread(REPT0,64,wk0) /* inf.ワク
fread(REPT1,64,wk0)
fread(REPT2,64,wk0)
fread(REPT3,64,wk0)
fread(REPT4,64,wk0)
fread(REPT5,64,wk0)
fread(REPT6,64,wk0)
fread(REPT7,64,wk0)
fread(HLPM,896,wk0) /* help mater
fread(DSP_MN,1600,wk0) /* disp. window
fread(DSP_CL,1600,wk0)
fread(DSP_BK,512,wk0)
fread(PROB0,256,wk0) /* problem list
fread(PROB1,256,wk0)
fread(FLW,256,wk0)
fread(NOP,256,wk0)
fread(stg_data,512,wk0)
fclose(wk0)
for i=0 to 255
wk0=stg_data(i shl 1)
wk1=stg_data((i shl 1)+1)
R_TXT(i)=(wk0 shl 8)+wk1
next
wk0=fopen(stg_fl+".DAT","r")
fread(stg_data,51200,wk0)
fclose(wk0)
/* wk0=fopen("PX_USR .DAT","r")
/* fread(user_data,51200,wk0)
/* fclose(wk0)
for i=0 to 15
stg_name(i)=&HFF
next
for i=0 to 899
edit_map(i)=0
next
for j=0 to 99
EDIT_SAVE(0)
user_data((stage shl 9) )=0
user_data((stage shl 9)+1)=0
stage=stage+1
next
stage=0
endfunc